XML Upload Error

Hi there,

As part of a web application I'm currently building I'm writing my own form builder which connects with the Aggregate server.

I tested by uploading an XForm compliant file to my front end and submitting it via a php cURL transfer to the aggregate server ( the /formUpload directory ). This worked fine.

However, now I'm generating the XForm file through code, so it isn't within a file but instead is sent as-is. I'm still using a cURL request, but the returned error is as follows: "Did not receive Form Name or Form XML Description".

This was an error code 400, returned from the /formUpload page of the Aggregate server, likely meaning that some part of the query being passed through is wrong.

What is different between the created document object and the xml file when passed through, and how can I fix this? If you have a better solution then let me know, but I have yet to find a good solution.

Thanks.

Look at the definition on the form upload page. Your programmatic
submission must match that structure (i.e., multipart/form-data ).

e.g.,

form id="ie_backward_compatible_form" accept-charset="UTF-8" method="POST"
encoding="multipart/form-data" enctype="multipart/form-data" action="
/formUpload" >

input id="form_def_file" type="file" size="80" name="form_def_file" />

input id="mediaFiles" class="gwt-Button" type="file" size="80,20" name="
datafile" multiple />

input id="upload_form" type="submit" name="button" class="gwt-Button" value
="Upload Form" />

/form>

ยทยทยท On Tue, Feb 21, 2017 at 5:42 AM, wrote:

Hi there,

As part of a web application I'm currently building I'm writing my own
form builder which connects with the Aggregate server.

I tested by uploading an XForm compliant file to my front end and
submitting it via a php cURL transfer to the aggregate server ( the
/formUpload directory ). This worked fine.

However, now I'm generating the XForm file through code, so it isn't
within a file but instead is sent as-is. I'm still using a cURL request,
but the returned error is as follows: "Did not receive Form Name or Form
XML Description".

This was an error code 400, returned from the /formUpload page of the
Aggregate server, likely meaning that some part of the query being passed
through is wrong.

What is different between the created document object and the xml file
when passed through, and how can I fix this? If you have a better solution
then let me know, but I have yet to find a good solution.

Thanks.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com