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
1
vote
0 answers

Java Httpclient MultipartEntityBuilder in HTTPS parameter were empty in java 1.7 and above

I am using HttpClient MultipartEntityBuilder below code used for file uploading and this is working in java all version if my URL is HTTP. This program not thrown any error while running and working in java 1.6 version also in HTTPS. Suppose if i…
1
vote
0 answers

MultipartEntity Android sending zip file but not able to save it in php

Im sending data using MulitpartEntity, I know zip file is being sent, I can loop it in php but for some reason the type returns empty. if($_FILES["imagezip"]["name"]) { $type = $_FILES["imagezip"]["type"]; $strLog .= $type . " type\n"; } it…
K3NN3TH
  • 1,458
  • 2
  • 19
  • 31
1
vote
2 answers

How to pass half parameters in requestUrl and other in JSON request in android?

I am new to android,I have made an activity in that i have to post some parameters to make api call and get response,I have to pass some parameters appending to request url and others as in Json format,Please tell me how can i do,My sample url…
user3820044
  • 177
  • 1
  • 3
  • 20
1
vote
2 answers

Android Unable to upload image to server. Wrong image type

I have an app that sends an image to a server using HttpCliend and MultipartEntityBuilder. My problem is that the sending isn't successful. I get a message "Invalid file" from the server. This is my sending method: public void executeMultipartPost()…
dephinera
  • 3,703
  • 11
  • 41
  • 75
1
vote
2 answers

How to send JSONArray string to php server using multipart entity in android

I am unable to send JSONArray string to php server using multipart entity in android. I have tried following but it's not working: MultipartEntity entity = new…
Rajeev Sahu
  • 1,732
  • 6
  • 26
  • 39
1
vote
0 answers

sending JSON with multipartentitybuilder

I am trying to send json with files using multipartentitybuilder I am receiving {"access_token"=>"1234", "title"=>"davac", "description"=>"vasdv", "subject"=>"{\"id\":\"100\"}"} at server side. "{\"id\":\"100\"} is a json string and I am trying to…
Brajesh Kumar
  • 929
  • 6
  • 16
1
vote
3 answers

Issues with Uploading an image to HDFS via webHDFS REST API

I am doing HttpPut with MultiPartEntity to write a file to HDFS via the webHDFS REST API. The request itself goes through and gives me the right responses, 307 and 201. However the image has multipart headers also written as part of it as shown…
B B
  • 149
  • 2
  • 15
1
vote
1 answer

Unable to attach file to POST request

I've got a problem sending file with POST Request. If fileName has brackets , then server doesn't receive file at all, otherwise server receive file with name I inserted. I've already tried to use - volley library - appach httpmime different…
PaulKh
  • 161
  • 1
  • 6
1
vote
0 answers

Android MultipartEntityBuilder upload text field utf8

I'm using MultipartEntityBuilder to upload an image to Facebook. when ever i put the "message" field with value in Hebrew i see "????" in the photo inside Facebook. I guess it has to do something with the encoding. When i tried to use the…
Asaf Nevo
  • 11,338
  • 23
  • 79
  • 154
1
vote
1 answer

Multipart Entity Sending images to php server on Android Application

I have searched for this answer everywhere and I cant find it. Would love for someone to help me. I am trying to send strings and an image thru Multipart Entity to a server. The strings are getting to the database but the image is always saying…
1
vote
0 answers

Android upload video to server using multipartEntity

I am using multipartEntity to upload videos to the server. Here is my code: public boolean uploadVideoToStickyworld(String fileName, String title, String description, String iEndpointURI) { boolean retBool = false; try { …
ruthot
  • 31
  • 2
1
vote
0 answers

java multipart upload on signed amazon s3 url using php web service

I am working on a project which uses amazon s3 to store all the files of user. It consists of web application and a desktop client. Desktop application is build in java. To upload a file from desktop application to amazon s3, I am requesting a web…
1
vote
0 answers

How to get files from PHP server?

I am sending FileBody to server by using MultiPartentity.It's uploaded successfully in server.But i don't know how to download(GET) that file from PHP Server. Here is my code for sending FileBody to server. This is for adding audiofile path into…
Android_dev
  • 320
  • 1
  • 7
  • 26
1
vote
2 answers

How to POST a request in any of rest clients for mime type as "multipart/related"

I'm trying to do a POST request from any of rest client like (Advanced rest client, Postman etc) for posting a request with mime type "multipart/related" but none of rest client supports. So is there a way to quickly POST a request from any of rest…
Manjunath
  • 11
  • 1
  • 2
1
vote
2 answers

Sending multiple images to the server from android

I am trying to post multiple values from android to server using multipart What I have done - I am able to send one image(from android drawable) to server. my present code: try { Bitmap bitmapOrg =…
Devrath
  • 42,072
  • 54
  • 195
  • 297