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
0
votes
1 answer

Uploading large files from android to c# asmx web service using Multipart Entity

I am getting request data from android which is through multipart entity request. how to accept that request and save the file in server side. Please check the code which is have tried. the file which coming from android is video file. [WebMethod] …
Shreekant
  • 111
  • 2
  • 11
0
votes
0 answers

how to get the key-value pairs added to MultipartEntity?

Let's say I have: MultipartEntity reqEntity = new MultipartEntity(); try { StringBody title = new StringBody("title"); StringBody des = new StringBody("description"); StringBody msg = new StringBody("message"); …
user1865027
  • 3,505
  • 6
  • 33
  • 71
0
votes
1 answer

MultipartEntity post array

I'm trying to upload file using http post request. I figured this is doable using MultipartEntity, as such: MultipartEntity entity = new MultipartEntity(); ... entity.addPart("caption", new StringBody("myCaption")); entity.addPart("file", new…
0
votes
1 answer

Sending a file with HttpPost?

I'm trying send an image to web service using HttpPost. The problem is when I try send image return an error that image does not found, but image exist I selected that in gallery. How can I solve this ? Here how I'm trying public Boolean…
FernandoPaiva
  • 4,410
  • 13
  • 59
  • 118
0
votes
2 answers

how to parse xml data from HTTPResponse in android

i have made an activity in android,in that i have made a multipart entity request using HttpPost,Now i am getting successfull respose also.but thing is i dont know how to get those data from response.i have tried number of links for parsing xml but…
jigar
  • 11
  • 5
0
votes
2 answers

android image upload to the server by a multipartentity

I wrote a code which takes picture from android device and then upload it on server.Can also upload pic from gallery. Uploading from gallery works perfectly.It is able to intent to mobile camera when clicked on capture button but when i return i…
Jesmeen Hoque
  • 411
  • 4
  • 8
0
votes
2 answers

Sending multipart form data with image and text in android

I have code to send text and multiple image in one request to server, my case is, I loop through local db to get the data and multiple image so I can use addPart(key, textdata); for the text data and addPart(key, filename, inputstream, …
Raditya Kurnianto
  • 734
  • 1
  • 16
  • 42
0
votes
0 answers

Http Post request testing in an Android app

i am writing a small app which uploads a picture when a taken a picture from camera. the following is the complete code. When i install this on my phone and run the app i don't see any thing in the apache tomcat logs(i.e post request is not not able…
rlvamsi
  • 179
  • 1
  • 2
  • 11
0
votes
2 answers

Android JAVA $_FILE returms empty at files bigger than ~ 50 mb

Problem: Trying to upload bigger than ~ 50 mb files, $_FILES return empty array. I try change limits on php (a lot of combination) but it useleass.. my class at java: public void upload() throws Exception { HttpClient httpclient = new…
Aseksas
  • 13
  • 4
0
votes
1 answer

looking for option which checks internet connection while sending data

I am creating a application in which I want to send image,text to server whenever internet(over 2G network) connection is available. I am implementing this logic with timer thread in service which checks internet connection is available or not…
0
votes
1 answer

App crashes when i use MultipartEntityBuilder in .addpart

Hi Im trying to send a file to my server. here is the code : File file = new File(Environment.getExternalStorageDirectory(),"/sdcard/img.jpg"); HttpClient http = AndroidHttpClient.newInstance("MyApp"); …
Hirad Roshandel
  • 2,175
  • 5
  • 40
  • 63
0
votes
0 answers

RuntimeException while httpclient.execute in BackgroundService

HttpClient httpClient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(urlString); HttpResponse response = null; MultipartEntity mpEntity = new MultipartEntity(); StringBody sb; String…
t18935
  • 59
  • 1
  • 6
0
votes
0 answers

Upload file does not show any error however does not upload the file

I am trying to upload the video file from the Android phone to the server using multiple methods. None of them seems to work as if now. First of all I tried using the normal Multi-part upload with which I am uploading the image and working…
Saty
  • 2,563
  • 3
  • 37
  • 88
0
votes
3 answers

Java PostData and MultiForm

I am trying to post some data to a server but not getting results as expected. I get 200 OK response but the returned html source has a string saying "Error - 404 Page not found" I think I'm doing something wrong with the set of data that I'm…
cpu2007
  • 905
  • 4
  • 11
  • 24
0
votes
1 answer

Unable to upload image to server in android

I have made a form activity in android which contains some textfields and photo,I want to send this parameters to server I am able to uplaod all other parameters successfully,But image is not uploading to server,Please help me save me..Thank you,My…