[En-Nut-Discussion] Send File via HTTP POST request
szemzo.andras at gmail.com
Tue Jan 19 17:48:52 CET 2010
Something like that:
fputs_P("<form action='/cgi-bin/upload.cgi' method='POST' enctype='multipart/form-data'>File: <input name='inputfile' type='file' size='30'><br><INPUT TYPE='submit' VALUE='Upload'></form>", stream);
With the registered upload.cgi you should not use a NutHttpProcessPostQuery() or NutHttpGetParameterCount() functions,
becouse the uploaded data will be MULTIPART, separated by boundary.
Instead you should write your own parser. First find the boundary, and than process your file read between the boundaries.
On Jan 19, 2010, at 5:25 PM, Goddchen wrote:
> Hey everybody,
> i need to send a file to NutOS via HTTP Post request. Therefore i need to
> specify the "multipart/form-data" enctype in my html form. Unfortunately
> NutOS won't understand that enctype and NutHttpGetParameterCount returns 0
> How can i send a file to NutOS via HTTP POST request? Any ideas?
> Greets, Goddchen
More information about the En-Nut-Discussion