Hi Thierry, In Paul's case (server-side parsing), there is a workaround which is to use the FileUpload extension: http://www.restlet.org/documentation/snapshot/ext/org/restlet/ext/fileupload/RestletFileUpload.html
Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Thierry Boileau [mailto:thierry.boil...@noelios.com] Envoye : jeudi 19 fevrier 2009 09:08 A : discuss@restlet.tigris.org Objet : Re: Form parsing doesn't work Hello Paul, as far as I know, multi part foms are not supported yet: http://restlet.tigris.org/issues/show_bug.cgi?id=71 best regards, Thierry Boileau > I have a bit of code that processes a multipart/form-data form. I'm > sending a test request using curl, e.g.: > > curl -v -F "from=paul%40lucasmail.org" "http://localhost:8182/foo" > > I have code that parses the form that starts off with: > > final MediaType mediaType = request.getEntity().getMediaType(); > final Form form = > MediaType.APPLICATION_WWW_FORM.equals( mediaType, true ) || > MediaType.MULTIPART_FORM_DATA.equals( mediaType, true ) ? > request.getEntityAsForm() : > request.getResourceRef().getQueryAsForm(); > > The form data isn't parsed correctly: the one and only name is the > boundary string. The FormReader class doesn't seem to handle > multipart/form-data. > > I'm using an older Restlet version (1.0.9), but I tried upgrading to > 1.1.2 and it makes no difference. > > How to I parse multipart/form-data forms correctly? (Preferably using > 1.0.9.) > > - Paul > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1188665 > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1190662 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1190683