Page 1 of 1
multipart/form-data how to get arguments?
Posted:
Wed Aug 24, 2016 4:03 pm
by treii28
I'm trying to grab arguments along with a file upload and when I check server.args it's empty. How do I parse the request to get my other form field data?
Re: multipart/form-data how to get arguments?
Posted:
Wed Aug 24, 2016 11:41 pm
by treii28
OK, with some playing I see I can add get/url parameters, but the enctype has to be multipart/form-data and I'm using post to do a file upload and it's not really gonna be too helpful if I have to modify the action to send parameters along with the file. Anyone?
Re: multipart/form-data how to get arguments?
Posted:
Thu Aug 25, 2016 12:47 am
by jankop
I'm probably dealing with the same or similar problem.
Can you be more specific please?
Re: multipart/form-data how to get arguments?
Posted:
Thu Aug 25, 2016 1:08 am
by treii28
There's not really a lot more to be specific about. I'm trying to handle a form with a file upload to an SD card webserver (based on the SD webserver example and it's upload capability) and I want to also add other form fields. (specifically the path to upload the file into)
If I do int server.args it comes back as zero even though there is a "dir" element in my form. If I add ?dir=something on the end of the form's "action" value, it goes through. But as a form field, it does not.
SW