Re: [Cppcms-users] Check space left on device before file upload
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-07-11 05:09:34
|
> 1) Check available disk space after client sent Content-Length header, > decide whether to accept the request or not I suppose, the header could be forged, just like content-type. > 2) Notify the application code, that upload failed because of too less > disk space (maybe one could do this via the existing infrastructure of > invoking validate() on the upload form field's widget instance and > adding another method that would return any occurred errors) Please have a look at boost::filesystem::space_info as it should do the trick. Petr |