Hello Pracheer,

at this time multipart entities are not supported by the framework (
http://restlet.tigris.org/issues/show_bug.cgi?id=71). You can still use the
fileupload extension as illustrated here:
http://wiki.restlet.org/docs_1.1/42-restlet.html.

Best regards,
Thierry Boileau



This is my html form POSTing a file and some form data to the server:
>
> <form action="
> http://localhost:8383/compareviews3/sites/sitename5/products/product2/";
> enctype="multipart/form-data" method="post" name="newImage"><input
> id="command" name="command" type="hidden" value="newImageValue"/><input
> id="imgFile" name="imgFile" type="file"/><br/><br/><button
> type="submit">Submit</button></form>
>
>
> When I try to create a form object of the entity received
> Form form = new Form(entity)
>
> This is the error I get:
> java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape
> (%) pattern
>        at java.net.URLDecoder.decode(Unknown Source)
>        at org.restlet.data.Reference.decode(Reference.java:165)
>        at com.noelios.restlet.util.FormUtils.create(FormUtils.java:75)
>        at
> com.noelios.restlet.util.FormReader.readNextParameter(FormReader.java:245)
>        at
> com.noelios.restlet.util.FormReader.addParameters(FormReader.java:129)
>        at com.noelios.restlet.util.FormUtils.parse(FormUtils.java:240)
>        at com.noelios.restlet.Engine.parse(Engine.java:979)
>        at org.restlet.data.Form.<init>(Form.java:84)
>        at org.restlet.data.Form.<init>(Form.java:133)
>        at
> restlet.resources.NodeResource.acceptRepresentation(NodeResource.java:1076)
> ...
>
> But I am able to receive the input file at the server end. I am having
> problem reading only the form input  sent along with the file.
>
> Any clues/hints/solutions??
>
> Thanks in advance
> Pracheer Gupta
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2634012
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2641923

Reply via email to