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

Is it a good practice to combine different parameters in to a single entity part in a MultiPart call?

In our project we are using the Multpart (http.entity.mime.MultipartEntity) to send data to the backend. Now, we have a new requirement which basically states the need to restrict the number of parts to two in a MultiPart request. Normally, we…
Ahmed Faisal
  • 4,397
  • 12
  • 45
  • 74
0
votes
2 answers

Change file name when sending file from android to server

I am writing an application with which a file can be uploaded to a server. During the running of the application, information is written to the file and deleted. Whenever the file is uploaded to the server, I want a new file name so that the old…
Sap
  • 168
  • 1
  • 16
-1
votes
2 answers

Android Bitmap null object reference

This is my exception: E/UploadBill: Error writing bitmap java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null…
-1
votes
1 answer

Image uploading not working with Multipart

Below is requesting parameters what I tried with postman and is working fine However, I am not able to do the same pragmatically from Android. Below is what I tried File urls= new File(fn) Part[] parts = new Part[1]; for (int i = 0; i <…
Atul Dhanuka
  • 1,453
  • 5
  • 20
  • 56
-1
votes
1 answer

send pdf to server and save it in database

I try to send pdf and text from android app to server , I succeeded in sending text. the problem is i can't send pdf , I don't if the problem in android code or php code so could anyone help me in this problem android code private class postData…
Shorouk Adel
  • 127
  • 3
  • 20
-1
votes
1 answer

How to indicate images in android gallery

Using my application i uploaded some images to server, next time while i open that application and trying to select images using that same application, how can i indicate the already uploaded images?
-1
votes
1 answer

How can upload file wilth httput without param key?

I used to make the thhpput call by passing parameters like this picture httpput with param now i want to to change with body binay methode like this picture httpput body binary i found the solution in ios : [request setHTTPBody: dataToUpload]; I…
1 2 3
15
16