|Re: [jetty-users] uploading the file with httpclient|
Hi, On Mon, Aug 12, 2013 at 4:00 PM, Makc <makc.the.great@xxxxxxxxx> wrote: > The hint seems to be this: "The POST request is sent with the > application/x-www-form-urlencoded content type, and POST parameter values > are automatically URL-encoded" while curl man page > http://curl.haxx.se/docs/manpage.html#-F says -F "causes curl to POST data > using the Content-Type multipart/form-data". So it looks like I need to > change request content type. contentType parameter in Request.file seems to > be mime type, actually. So I again is clueless where to specify it :( At the moment we do not support multipart uploads out of the box. Not all file uploads are uploaded via multipart :) As a workaround, you have to manually produce the multipart content with a custom ContentProvider. In any case, please add a feature request to support a simpler way to perform multipart uploads in HttpClient at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Jetty. Thanks ! -- Simone Bordet ---- http://cometd.org http://webtide.com http://intalio.com Developer advice, training, services and support from the Jetty & CometD experts. Intalio, the modern way to build business applications.
Back to the top