Login  Register

Re: Re: submission with xml data and file upload ?

Posted by Alessandro Vernet on Jan 07, 2010; 12:05am
URL: https://discuss.orbeon.com/submission-with-xml-data-and-file-upload-tp999016p1008511.html

Leigh,

Yes, but unfortunately the multipart/related serialization is not yet implemented.

Alex



On Jan 6, 2010, at 3:10 AM, "Leigh L. Klotz Jr" <[hidden email]> wrote:

You need submission method="multipart-post" which uses serialization multipart/related.
http://www.w3.org/TR/xforms11/#serialize-multipart
It's not clear that Orbeon implements this currently, though.

Leigh.

On 01/05/2010 05:33 AM, Karolin Krieg wrote:
Hallo all,

I wonder how to upload files and XML data in one submission?
The XML data and uploaded file has to be validated and saved in one transaction on the server-side.

After submitting my instance data, a servlet reads out the XML data from the request input stream.
<xforms:submission id="submit_1" method="post" ref="instance(employee-instance)" resource="http://localhost:8080/test/submit"/>

To upload files I have to set the submission serialization to multipart/form-data to read out the uploaded temp file.
<xforms:submission id="submit_2" method="post" ref="instance(file-instance)" resource="http://localhost:8080/test/submit" serialization="multipart/form-data"/>

But with multipart/form-data I cant read out the XML data any more because the content of the server is a isMultipartContent of all single form fields.

How can I achieve to send and read out the XML data and file together?


Thank you for your help,
Karolin



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet