Re: [Cppcms-users] Fw: Advice on debugging file upload
Brought to you by:
artyom-beilis
From: doug l. <bi...@gm...> - 2012-04-24 21:16:15
|
Ah, I have it -- it looks like there's some cppcms magic involved in constructing and handling forms. The fields "owner" and "data" in my form got translated in the markup into inputs with the non-natural names "_1" and "_2", like so: <form method="post" action=""> <p><span class="cppcms_form_input"><input type="file" name="_1" ></span></p> <p><span class="cppcms_form_input"><input type="text" name="_2" value="Ding" ></span></p> <p><span class="cppcms_form_input"><input type="submit" name="_3" value=" Upload" ></span></p> </form> And when I replicated this with cURL like so: $ curl localhost:8080/imageserver/abc -F _1="def" -F _2=@features/fixtures/img01.jpg It worked. So now I need to figure out how to submit a form to cppcms with fields named in a more natural manner, not "_1", "_2", etc. Which is progress! :) Cheers, Doug. |