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

slack api : files to upload to slack channel

I'm trying to publish image from my automation suite to slack channel. URL to hit: https://slack.com/api/files.upload Body is form-data type and it has, file - image file upload initial_comment - some string channels - the slack channel to be…
MSD
  • 1,409
  • 12
  • 25
0
votes
0 answers

How to fix 'Cannot cast object with class MultipartFormEntity to HttpEntity' erro in Groovy

I'm trying to Post RestAPI with form-data content in Groovy. MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create(); multipartEntity.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); multipartEntity.addPart("nationality", new…
0
votes
3 answers

MultipartEntity not creating good request

I needed to send some XML to a webservices and I was able to do it with a normal StringEntity because it was just text but now I need to attach an image to it as well. I tried doing it with a MultipartEntity but I couldn't get it working with just…
Mats Hofman
  • 7,060
  • 6
  • 33
  • 48
0
votes
1 answer

HttpClient - add CipherInputStream to MultipartEntity

I want to add an encripted stream to my multipartentity to upload it to my servlet but I don't know how to do that... Emm then MultipartEntity is quite limited as for addPart(...,...) method params. I found no examples in that area so I need your…
user592704
  • 3,674
  • 11
  • 70
  • 107
0
votes
1 answer

Issue uploading files to a web server

If the file name contains Turkish characters (ş, ı, ü, ü, ö, ğ), the file is not uploaded to the web server. The upload to web server is done on php page. There is no problem there. It uploads file names that do not contain Turkish characters…
0
votes
1 answer

Attachment upload to Jira Service Desk using REST

I want to upload an attachment using REST to a Jira Service Desk ticket. I understood, that in order to do that first i must upload a temporary attachment, if that response is OK, i can use the temporaryAttachmentId to upload the attachment to a…
Gábor Csikós
  • 2,787
  • 7
  • 31
  • 57
0
votes
1 answer

sending named Mulitpart Data wit HttpClient

I try to Send Multipart Content as a Post to an WebService using c# HttpClient My Code is the Following public string UploadDocument(Stream stream) { MultipartContent multipart = new MultipartContent(); //multipart.Add(new…
Sebastian
  • 1
  • 1
0
votes
1 answer

While uploading image to server (error while uploading)

In my app I m sending 3 parameters to server latitude,longitude and image.Earlier i was using volley for sending the parameter, but since i have a image also I had to use Multipart in my code.But i m getting an error while uploadind. In the…
0
votes
0 answers

Upload large image file from android into MySQL BLOB via PHP and using MulipartEntityBuilder()

I was testing a method by which I could upload an Image available on my Android device into a BLOB field of a mySQL table. Couple of posts I ran into spoke about broader points but I was not able to tie them all up together. Here is a part of my…
Prem
  • 83
  • 1
  • 1
  • 5
0
votes
0 answers

How to send multiple files to server in android?

Good day to all. I am having clarification about to send multiple files to server. I have completed that send single file to server. Below code is detail about send single file to server. private static final int FILE_SELECT_CODE = 0; public String…
karthik
  • 321
  • 1
  • 8
  • 21
0
votes
0 answers

Volley post request using MultipartEntity

I want to upload image file with help of volley (POST). my request is already working and i made JSONObject and can connect to url and post title and description for my data. now i want to add image with it in next level using MultipartEntity. I…
0
votes
0 answers

Last byte[] only send to the server by using MultipartEntity in android

I have implemented the multipleimage uploading.If i select three value means,all three images are converted into byte[] perfectly but last value only send into server.How to send all three images.I have tried like this int i=0; for ( i…
sri
  • 105
  • 9
0
votes
0 answers

Upload large base64 string

I need to upload base 64 string to server. String length is too large approximately 5.6 million characters(only one string at a time). For this, which is the best/fastest way to send the string to server? I found many solutions, but commonly used…
0
votes
0 answers

HttpPost - Sending image and text with Multipart - Error

I am sending image and text to server using Multi part. I am getting error as I need to send empty string in one parameter like: HashMap Map = new HashMap(); Map.put("course_id", ""); In Asynctask, MultipartEntity…
0
votes
1 answer

uploading file to server failse witha a log - VFY: unable to resolve static field 44070

In my android project I'm uploading a zip file to a server using HTTP post request. In this case I'm using httpcore and httpmime libraries. I'm using an AsyncTask to make the upload. the doInBackground method of the AsyncTask is as below, @Override …
Samantha Withanage
  • 3,811
  • 10
  • 30
  • 59