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

How to send multiple file to webservice

I have a webservice written by C# [HttpPost] public JsonResult PostFileToServers(HttpPostedFileBase[] files) { foreach (var file in files) { var fileStorage = @"C:\Users\Aka\Dropbox\SMAC\file-upload"; …
0
votes
1 answer

Multipart File Upload from android

I am sending a multipart request,and my file is attached like this entity.addPart(entry.getValue().getName(), new FileBody(entry.getValue(), entry.getValue().getName(), "image/jpeg", "ISO-8859-1")); entity is an MultipartEntityBuilder object. I…
Raji A C
  • 2,261
  • 4
  • 26
  • 31
0
votes
0 answers

MultipartEntityBuilder on API 22

I want to upload an image to server but i need to send 2 more things in order to connect with the server any HELP cause im really stuck on this one. MultipartEntityBuilder builder = MultipartEntityBuilder.create(); // MultipartEntity…
0
votes
0 answers

How do I use androidHttp to upload multipart video to server

According to the android documentations, I should be using AndroidHttp.HttpTransport instead of Apache as Apache may not be supported in the future, etc. etc. Does anyone know how to use AndroidHttp for sending multipart data to server? I need to…
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199
0
votes
1 answer

Cannot upload video file in android using MultipartEntityBuilder in async task

I'm trying to upload a video file using mime.MultipartEntityBuilder, but I' getting the following error in my logcat 09-24 14:38:59.673: E/AndroidRuntime(3072): FATAL EXCEPTION: AsyncTask #1 09-24 14:38:59.673: E/AndroidRuntime(3072):…
1binary0
  • 93
  • 11
0
votes
0 answers

MultipartEntity Android always return server error

I have two days facing a problem sending Multipart form request that include data and images, and server always give me error "Unsupported Media Type" I have tried 3 version of apache httpclient which are (4.1, 4.3, 4.5) Here is my code…
0
votes
1 answer

How to upload JSON data on Server usinh Multipart

I have huge json data to upload on server, but when I upload using HttpPost getting SocketTimeout Exception, while I changed timeout to 25000 and more. Does anyone has solution for it? Does MultiPartEntity will help me in this case ? If yes then how…
Neha Shukla
  • 3,572
  • 5
  • 38
  • 69
0
votes
1 answer

Android HttpPost and HttpClient Substitute

Just a quick question. Until now I have been using HttpClient and HttpPost to post a file and some parameters to a php script on my server. However they have been deprecated. I was wondering what i could use to substitute it. I found some answers on…
0
votes
1 answer

Android Compress Audio/Video Before Sending to Server

I want to compress a video/audio file before sending to the server because it takes too much time to upload. I am using a multipart entity with a string body to upload the file on server. My code is below. Please give me any possible solutions to…
0
votes
0 answers

Android multipart entity image upload error

I am having a problem when uploading image to the server. When I upload it I get the HTTP 1.1 200 OK but then when I wath the response I see that the file is not uploaded because file of the same name already exists or not valid type. Here is my…
Lukas Anda
  • 716
  • 1
  • 9
  • 30
0
votes
2 answers

The method setRequestProperty(String, String) in the type URLConnection is not applicable for the arguments (String, ArrayList)

I am trying to send multiple images to server but,so I am storing all the images in one arraylist,but after that when I need to send to server,it shows error near line ,,...................... conn.setRequestProperty("image", multimgss);…
user4767117
0
votes
0 answers

Android upload image via HTTP PUT

I'm trying to upload a jpeg image to my web server via an HTTP PUT method. With Fiddler, I'm able to compose an HTTP PUT request, upload the image and execute the request successfully. However, on Android, I can't get it to work. I've read many…
Francis BF
  • 13
  • 1
  • 4
0
votes
2 answers

Android eclipse error on File upload to server

In my android eclipse project, i want to upload image file with name and email fields to server. But i got the following error : my logcat is following : NoSuchFieldError - BasicHeaderValueFormatter.INSTANCE E/AndroidRuntime(25348): Caused by:…
Joseph Mekwan
  • 1,082
  • 1
  • 15
  • 28
0
votes
0 answers

How I can get data on server when I send it in android by multipart

I have trouble with received data on server. I have android app which send data by multipartentity. I want to send two files (video and image). This is code from android: protected void uploadStuff(String videoPath, String backgroundPath, String…
kosmit
  • 621
  • 2
  • 7
  • 23
0
votes
2 answers

java.io.FileNotFoundException when Uploading pics from camera using HTTP Post MultipartEntity

I am trying to upload pic from my device to the server.Uploading pic from gallery is working fine but uploading pic from camera gives error java.io.FileNotFoundException: /storage/emulated/0/1421501712960.jpg: open failed: ENOENT (No such file or…