Re: [Cppcms-users] Advice on debugging file upload
Brought to you by:
artyom-beilis
From: doug l. <bi...@gm...> - 2012-04-24 17:33:43
|
Ah, that got rid of that error, thankyou! Unfortunately, I'm still not getting any content for the file, and when I try to output the value of the form's key widget, I'm getting an empty string, even though the call to cURL explicitly sets the value. Could this be because I'm using cURL? & sorry to be spamming the list with this -- I'll be good & quiet when I've got the hang of everything, honest. ;) Doug. On 23 April 2012 20:57, Artyom Beilis <art...@ya...> wrote: > Read: http://cppcms.com/wikipp/en/page/cppcms_1x_forms > > Your widgets are not registered withing the form > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* doug livesey <bi...@gm...> > *To:* Artyom Beilis <art...@ya...>; > cpp...@li... > *Sent:* Monday, April 23, 2012 10:13 PM > > *Subject:* Re: [Cppcms-users] Advice on debugging file upload > > Ah, so it looks like my issue is something else -- my form isn't even > getting loaded. > For completeness, I have a simple context object: > https://github.com/biot023/improc/blob/master/content.h > And I have a simple server: > https://github.com/biot023/improc/blob/master/imageserver.cpp#L32 > And I'm testing the server with this call to cURL: > $ curl localhost:8080/imageserver/abc -F > file=@features/fixtures/img01.jpg -F key=def > > The response is a 500, and the error that cppcms logs to cerr is this: > 2012-04-23 20:07:57; cppcms, error: Caught exception [Value was not > loaded] > 0x10653d2b3: cppcms::cppcms_error::cppcms_error(std::string const&) + > 0x63 in /usr/local/lib/libcppcms.1.dylib > (http_context.cpp:139) > > The error is caused by the highlighted line in the imageserver.cpp file. > From my reading of the tutorials, the create() member function should be > loading the form from the context(), but obviously it isn't, so obviously > I'm missing something. > Can anyone maybe see where I'm going wrong / what I'm failing to do? > & thanks again for all the help, it's really appreciated. > Doug. > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |