All Questions
Tagged with java multipartentity
71 questions
1
vote
1
answer
621
views
Unit Testing for MultiPartEntityBuilder fails with org.apache.http.ContentTooLongException: Content length is unknown
I have a class in my javax servlet application that serves as a proxy and creates multipart form data for POST requests. During regression tests (actual calls to the servlet) the application performs ...
1
vote
1
answer
2k
views
Converting input stream containing multipart form data to string in java
I have http response object "httpResponse" which is instance of class javax.ws.rs.core.Response. I have to convert it into a human readable string object for debugging. How can I achieve ...
0
votes
1
answer
1k
views
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 - ...
2
votes
1
answer
538
views
In Android Does multipart entity is used for download file too as I can't see any example or details description for that class
I was asked to look for downloading file using MultiPartEntity in android However i searched a lot but couldn't find any solution where I can download file using MultiPartEntity. it seems it is used ...
1
vote
0
answers
98
views
Sending a file and a string using MultiPartEntity in Android to server
I have an Android app from which I can select a video and select an option from a drop down. I want to send both of these to the server for analysis and get back the results. This is the code.
...
1
vote
1
answer
303
views
Unable to upload image first time, it works in the second time
I am uploading any type of file from my code but the problem is when I run my code for the first time and try to upload an image, the image not being uploaded in that time. If I upload a file first, e....
3
votes
0
answers
963
views
Constructing a multipart request from InputStream with Apache Async HTTP Client
I am trying to send a multipart request through apache async http client, but getting a org.apache.http.ContentTooLongException: Content length is unknown error.
I do understand why content length is ...
1
vote
1
answer
1k
views
Image uploaded in byte array to server get corrupted(Image can't be opened)
Server side expect image to be send in byte array, I am able upload image successfully(200 response) but when check image in server image get corrupted(image can't be open).
I tried following ways ...
0
votes
1
answer
432
views
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 ...
1
vote
2
answers
3k
views
No available MessageBodyWriter for media type "multipart/form-data"
I'm trying to create a jersey client to hit a server with multipart request.
I have the file to upload as a java.io.ByteArrayOutputStream type stream.
I searched for the error and came across this ...
4
votes
5
answers
7k
views
Encode filename in MultipartEntityBuilder
I am trying a file upload API using HttpPost and MultipartEntityBuilder. Following is the code I have used.
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setCharset(MIME....
0
votes
0
answers
996
views
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 ...
2
votes
1
answer
165
views
post file with httpcomponents. Something wrong with memory
I'm trying to send file on my rest service. I'm using apache httpcomponents 4.3.
It works, but it use about 600 MB. Always, if file 200 KB or 15 GB it use 600 MB of Ram.
If I remove addPart - memory ...
3
votes
1
answer
3k
views
Multipart File upload using Apache REST client
I was trying to upload files to OneDrive using multipart request. I've tried many ways but none of them worked.
The request is of the form :-
POST /drive/items/{folder-id}/children
Content-Type: ...
0
votes
1
answer
115
views
Android Json Parsing with multipartEntity
I need to parse this as an JsonArray instead of objects
but it dosent seem to work correctly.
my output is ["{"TransactionVolume":"34","TransactionitemID":"2"}"]
I need it to be [{"...