I have had a lot of difficulty in getting a file upload to work, in
XSLTForms rev.638, on either Firefox 50.1.0 or Chrome 55.0.2883.87 on Linux
Mint.

What I am trying to do is use an <xf:upload> to load a local XML file, and
submit it to a web service which will convert it into some other format.
The web service expects an HTTP POST, but I believe it is happy with a
serialization of "application/xml" or "multipart/form-data" and possibly it
may work with "multipart/related". I have tried the various XForms methods
"post", "form-data-post", and "multipart-post" without success.

I have tried a number of things.

It appears to me that the "form-data-post" submission method is not
supported by XsltForms at all

It seems (from reading the JS code) that the "multipart-post" IS supported,
however, it fails to correctly serialize my instance containing the
file:/// URI set by my xf:upload (the XML containing the URI is sent
instead of the content which the URI refers to, even though I have set the
xsi:type="xsd:anyURI"). The same problem happens with the "post" method.

Is this known behaviour? I am puzzled because the W3 XForms 1.1 test suite
results at
http://www.agencexml.com/xforms-tests/testsuite/XForms1.1/Edition1/driverPages/forms/XF11_TestSuite.xhtml
indicate that "form-data-post" should work.

I would appreciate any clarification about this is supposed to work, or
advice as to what functionality is missing.

Thanks!


Conal



-- 
Conal Tuohy
http://conaltuohy.com/
@conal_tuohy
+61-466-324297
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to