After another week web search, I figured out how to submit xml form text data to Aggregate by "curl -F"
Then, I think it will be not so difficult for me to submit associated file such as jpg image file to Aggregate. But it is not.
For example image file = image.jpg
Did try:
curl -F "image=@image.jpg" "[AggregateServerURL]/submission" -> not working.
curl -F "media=@image.jpg" "[AggregateServerURL]/submission" -> not working.
curl -F "binary=@image.jpg" "[AggregateServerURL]/submission" -> not working.
OpenRosa submissions are POSTed to servers as a multipart MIME Envelope *with
at least 1 part (the xml content of the form itself). *Each of these parts
should adhere to the following requirements
Mime Envelope:
Content Type: multipart/form-data
Contains Exactly 1 XForm Part
Contains 0 or More Additional Parts
XForm Part:
Content Type: text/xml
Name: xml_submission_file
Additional Parts
Content Type: arbitrary
Name: matches an appropriate element inside of the XForm Element's XML.
···
-
i.e., you MUST send the submission XML with every request. You cannot just
post an image up to the server.
And, to clarify, for the additional (media) parts, the Name is the text
string (filename) that appears within the submission XML for one of the
media fields.
After another week web search, I figured out how to submit xml form text
data to Aggregate by "curl -F"
Then, I think it will be not so difficult for me to submit associated file
such as jpg image file to Aggregate. But it is not.
For example image file = image.jpg
Did try:
curl -F "image=@image.jpg" "[AggregateServerURL]/submission" -> not
working.
curl -F "media=@image.jpg" "[AggregateServerURL]/submission" -> not
working.
curl -F "binary=@image.jpg" "[AggregateServerURL]/submission" -> not
working.
Anyone who can help me? I have managed to install my enketo server express
to a point where all i need is to map it to my server so we can start
working offline, i have found the api key after a long strgle, but facing a
problem as shown in the picture below.. how to get around this would be so
much appreciated.
···
--
Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.
Anyone who can help me? I have managed to install my enketo server express
to a point where all i need is to map it to my server so we can start
working offline, i have found the api key after a long strgle, but facing a
problem as shown in the picture below.. how to get around this would be so
much appreciated.
Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to https://nafundi.com to get started.
Anyone who can help me? I have managed to install my enketo server express
to a point where all i need is to map it to my server so we can start
working offline, i have found the api key after a long strgle, but facing a
problem as shown in the picture below.. how to get around this would be so
much appreciated.