Re: [Cppcms-users] CPPCMS and huge file uploads
Brought to you by:
artyom-beilis
|
From: Artyom <art...@ya...> - 2010-08-10 11:29:43
|
>
> Currently, I'm using 0.99.2.1, now compiling latest SVN revision just to
> check whether it works there.
There is no difference in file handling between svn and beta 0.99.2
so don't need to do.
> In my code, I did not invoke the file widget's limits() method to set
> limits, now I did this and set them to 0 for min and -1 for max, and
> validate now returns true, but the file is zero bytes long (if I set min
> to 1, validate returns false again).
Before you use widget validation, just for debugging:
Print what you are actually uploaded without relation to specific widget:
cppcms::http::request::files_type files=request().files();
std::cout << "Got files" << std::endl;
for(unsigned i=0;i<files.size();i++) {
std::cout << files[i]->name() << " " << files[i]->filename() << " " <<
files[i]->size() << std::endl;
}
std::cout << "Done" << std::endl;
And see if you get anything uploaded.
Once you got continue to widget itself to check validation procedure.
|