Questions tagged [multipartentity]

MultipartEntity is successor of HttpEntity, contained in HttpMime API since version 4.0. It's use is primary to simplify process of posting multipart content over HTTP. It allows to add multiple parts of different content-type and encoding.

MultipartEntity, part of HttpMime 4.0 and later. Allows you to put multiple parts, separated by boundary strings and encoded using given charset, into request.

It can have different modes, based on HttpMultipartMode constants. RFC Strict mode ( RFC 822, RFC 2045, RFC 2046 compliant ) and Browser compatible mode.

Each part of request is set via addPart(String name, ContentBody body) or addPart(FormBodyPart body) method.

Note that request, can have only one entity set, so all data must be fit in MultipartEntity object.

232 questions
2
votes
1 answer

MultipartEntityBuilder HttpPost socket write error in java

I am trying file upload with httpPost request (by MultipartEntityBuilder) in java. But i get a Software caused connection abort: socket write error. Here is my httpPost body (in…
2
votes
2 answers

How extract files from response entity

I have a servlet that gives the clients many files in one request. I put files(image,pdf,...) or other data (like json,...) as byte array in the response : MultipartEntityBuilder builder = MultipartEntityBuilder.create(); ByteArrayBody pic1 = new…
Habib Zare
  • 1,206
  • 8
  • 17
2
votes
1 answer

Unable to Upload Video File using Multipart Entity

I'm trying to upload an video file using Multipart Entity. For using Multipart Entity method, it was mentioned that I should the following jar files httpclient, httpmime, httpcore. But on adding the httpcore jar file I couldn't run my project and it…
Parthiban M
  • 1,104
  • 1
  • 10
  • 30
2
votes
0 answers

Android Application crash in executing http post with MultipartEntity

I'm trying to post data to server with user name, user id and profile picture using android HttpPost. When I execute the http post, application crash and nothing shows in log. My code is as following : protected String doInBackground(String...…
Thiha Zaw
  • 806
  • 1
  • 9
  • 25
2
votes
0 answers

Android to WCF: Streaming multi part image and Json string

Android to WCF: Streaming multi part image and Json string I want to create a WCF-RESTful web service method,in which i need to upload an image(multipart-form data) along with some other information (in JSON format). This web service will be…
2
votes
2 answers

Making an HttpRequest with MultipartEntity in it

I've been frustrated at trying to figure out how to make an http request with a multipart entity in it. The multipart has a custom boundary but I can't seem to be able to set it. My code below results in a response message of saying that my message…
Tereno
  • 923
  • 1
  • 13
  • 20
2
votes
2 answers

Android Studio MultiPartEntityBuilder Error

i am currently making an app to get the image from the camera and the gallery to upload to the PHP server. But there is something wrong with my app. I used two ways to do this task. The first one is to encode the image with Base64, then use the…
CHENGJIE LIN
  • 21
  • 1
  • 2
2
votes
1 answer

How to limit part size of MultipartEntity

Is there some way to limit the parts size sended on a MultipartEntity from the org.apache.http.entity.mime.MultipartEntity ? I need limit this size to 2 MB. Thanks!
rlopezo
  • 425
  • 5
  • 16
2
votes
1 answer

Parsing Multipart request in Play framework

I'm sending a video file and some other data from my Android application to my server running a Play framework application, I'm using a combination of multipartEntity and Volley to send the Post request to the server. I need to parse the received…
JTK
  • 1,469
  • 2
  • 22
  • 39
2
votes
1 answer

Pass Class Object to MultiPart Entity in android

I have to work on an application where i need to send the class object as Parameter using Multipart Entity along with a file. I have checked that the Multipart addpart method doesn't accept an Object to post to Web Api.Below is the Code i have…
hemanth kumar
  • 3,068
  • 10
  • 41
  • 64
2
votes
1 answer

Formatting HTTP Post Request Parameters with nested in JAVA android

I'm trying to post the following data to my rails App. It's expecting the format to be as follows: Parameters: { "utf8"=>"✓", "authenticity_token"=>"oSJ2ut0T1HGJ+KcBAPPP4lwn8Hc4Xwkn8emVujXy9xQ=", "wine"=>{"name"=>"nice wine", "vintage"=>"1923",…
Ng Zhong Qin
  • 1,211
  • 2
  • 15
  • 28
2
votes
0 answers

How to compress a video to maximum level android

I am working on Android app. I am compressing recorded video clarity to send it to server. The maximum lenght of video is of 30 sec. I am able to upload the video from the phones having 2 or 3 MP. But unable to upload from the phones having 8 MP…
user2085965
  • 393
  • 2
  • 13
  • 33
2
votes
1 answer

Upload file by HTTP POST

I want to upload a file (an image specifically) to a REST Server using HTTP POST. I have already imported/add to build path httpmime-4.3.1.jar and apache-mime4j-0.6.jar. And I am getting the follow errors below in the Stack Trace. Is this valid?…
The Nomad
  • 7,155
  • 14
  • 65
  • 100
2
votes
1 answer

MultipartEntity POST android

I'm implementing app upload file by android.I have a service : http://example.com:1001/UPLOAD/FileUpload.do. I want to upload a file and two parameter like that 0?event=Upload&type=:1 :0 SERVER [current http://example.com:1001/UPLOAD/FileUpload.do]…
lonelyboy0212
  • 31
  • 1
  • 1
  • 5
2
votes
1 answer

Pass JSONArray's object values to mysql using php in android

I have to pass JSONArray's object values to php which will then insert all data of object into mysql database. Below is my code in android, MainActivity.java private void uploadUserId_FriendId(String user_id , JSONArray friend_id) { try { …
thumber nirmal
  • 1,639
  • 3
  • 16
  • 27