multipart

JAX-RS Multipart with com.sun.jersey

假装没事ソ 提交于 2020-01-17 07:16:12
问题 I have a REST service hosted inside Karaf, which is working fine with all requests except for multipart requests. I'm using the com.sun.jersey packages, as I have only succeeded in hosting these inside of Karaf to be accessed over HTTP. When I try to receive the HttpServletRequest inside the POST and call the getParts() method on it, I get the error: IllegalStateException: No multipart config for servlet I have found that I am missing the @MultipartConfig annotation on my servlet, so I added

nested multipart request using retrofit

孤街浪徒 提交于 2020-01-14 06:19:07
问题 I need to make a request which is in nested multipart data. I need to send image in multi part form data and other details should also be in multipart. My Json request is as follow: { "emailId": "vision.jav@avenger.com", "phoneNumber": "7417385811", "profileImage": "image", "password": "12345678", "customerDetails": { "firstName": "vison", "lastName": "vision" }, "addressDetails": { "city": "chicago", "province": "NY", "postalCode": "654987", "latitude": "28.52", "longitude": "77.54" },

MultipartResolver is not working

≯℡__Kan透↙ 提交于 2020-01-13 11:13:12
问题 I using developing a RESTFul web service using Maven and Spring Roo. In my configuration xml file I defined a multipartResolver bean because I am uploading files of 300KB: <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize" value="400000" /> <property name="maxInMemorySize" value="400000" /> </bean> The files are uploaded successfully and pushed into a stack. These file are CommonsMultipartFile or

Multipart request with Retrofit @PartMap Error in Kotlin (Android)

核能气质少年 提交于 2020-01-11 18:41:08
问题 If I am using this code in Java then its working fine. When I convert that code in kotlin then I got Error. Logcat 08-20 23:46:51.003 3782-3782/com.qkangaroo.app W/System.err: java.lang.IllegalArgumentException: Parameter type must not include a type variable or wildcard: java.util.Map (parameter #1) 08-20 23:46:51.003 3782-3782/com.qkangaroo.app W/System.err: for method ApiInterface.updateCustomerDetail 08-20 23:46:51.003 3782-3782/com.qkangaroo.app W/System.err: at retrofit2.ServiceMethod

Post files to server from Android - MultipartEntityBuilder - HTTP

旧时模样 提交于 2020-01-11 11:22:34
问题 I am trying to upload some files to my server (via HTTP POST) from an Android app and I have checked many Questions here but can't get it to work. I hope someone can help me out: I also included some variables in the URL to verify that at least those are reaching the server(GET). HttpClient httpClient = new DefaultHttpClient(); String url="http://XXXXX.com/files/upload.php?flies=yes&eats=no&friend=yes"; HttpPost httppost = new HttpPost(url); httppost.addHeader("Content-Type", "multipart/form

Multipart Request using Retrofit 1.8.0 not working

让人想犯罪 __ 提交于 2020-01-11 05:15:29
问题 I have like 4 days, trying to make a Multipart Request using Retrofit 1.8.0 in android with any success. My interface looks something like this @Multipart @POST("/posts/add.json") void addComment( @Part("id") String id, @Part("post[body]") String body, @Part("post[attachment]") TypedFile attachment, Callback<Map<String, String>> callback ); But, in the server side, I receive the following Parameters: {"id"=># <File:/var/folders/z0/0ggjvvfj4t1fdsvbxf3lc9pw0000gn/T/RackMultipart9853-0>, "post"=

Multipart Request using Retrofit 1.8.0 not working

与世无争的帅哥 提交于 2020-01-11 05:15:11
问题 I have like 4 days, trying to make a Multipart Request using Retrofit 1.8.0 in android with any success. My interface looks something like this @Multipart @POST("/posts/add.json") void addComment( @Part("id") String id, @Part("post[body]") String body, @Part("post[attachment]") TypedFile attachment, Callback<Map<String, String>> callback ); But, in the server side, I receive the following Parameters: {"id"=># <File:/var/folders/z0/0ggjvvfj4t1fdsvbxf3lc9pw0000gn/T/RackMultipart9853-0>, "post"=

Retrofit 2 Multipart image upload with data

北城以北 提交于 2020-01-10 20:13:29
问题 Hello everyone I want to post image and other data through Retrofit2. I am sending data with one image. All the other info is storing but my image is not storing.while i am testing with postman, it works. please guide me where I am lacking in my code This is the postman code snippet that works OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"); RequestBody body = RequestBody.create(mediaType, "

Retrofit 2 Multipart image upload with data

て烟熏妆下的殇ゞ 提交于 2020-01-10 20:13:10
问题 Hello everyone I want to post image and other data through Retrofit2. I am sending data with one image. All the other info is storing but my image is not storing.while i am testing with postman, it works. please guide me where I am lacking in my code This is the postman code snippet that works OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"); RequestBody body = RequestBody.create(mediaType, "

C# Multipart Mime object

大城市里の小女人 提交于 2020-01-07 13:36:53
问题 I am receiving file through url request which has following contents. --MSMboundary Content-Type: image/jpeg Content-ID:15870126 Object-ID:1 Content-Description: null ÿØÿà JFIF ` ` ÿÛ C $.' ",#(7),01444'9=82<.342ÿÛ C 2!!22222222222222222222222222222222222222222222222222ÿÀ È " ÿÄ --MSMboundary Content-Type: image/jpeg Content-ID:15870126 Object-ID:2 Content-Description: null ÿØÿà JFIF ` ` ÿÛ C $.' ",#(7),01444'9=82<.342ÿÛ C 2!!22222222222222222222222222222222222222222222222222ÿÀ È " ÿÄ ÿÄ µ -