Questions tagged [multipart]

Multipart is content type that allows multiple MIME types to be embedded in a single message.

Commons uses of multipart subtypes include:

References

1904 questions
451
votes
3 answers

What is http multipart request?

I have been writing iPhone applications for some time now, sending data to server, receiving data (via HTTP protocol), without thinking too much about it. Mostly I am theoretically familiar with process, but the part I am not so familiar is HTTP…
MegaManX
  • 8,766
  • 12
  • 51
  • 83
145
votes
3 answers

Example of multipart/form-data

I am wondering if anyone can share with me an example of multipart/form-data that contains: Some form parameters Multiple files
user496949
  • 83,087
  • 147
  • 309
  • 426
119
votes
2 answers

What should a Multipart HTTP request with multiple file inputs look like?

I'm working on an iPhone app that makes a multipart HTTP request with multiple image files. It looks like what's happening, on the server side, is that one of the images is getting parsed properly, but the other two files are not. Can anybody post…
bpapa
  • 21,409
  • 25
  • 99
  • 147
117
votes
13 answers

How can I make a multipart/form-data POST request using Java?

In the days of version 3.x of Apache Commons HttpClient, making a multipart/form-data POST request was possible (an example from 2004). Unfortunately this is no longer possible in version 4.0 of HttpClient. For our core activity "HTTP", multipart…
lutz
108
votes
7 answers

POST data using the Content-Type multipart/form-data

I'm trying to upload images from my computer to a website using go. Usually, I use a bash script that sends a file and a key to the server: curl -F "image"=@"IMAGEFILE" -F "key"="KEY" URL it works fine, but I'm trying to convert this request into…
Titouan56
  • 6,932
  • 11
  • 37
  • 61
101
votes
4 answers

Sending Multipart html emails which contain embedded images

I've been playing around with the email module in python but I want to be able to know how to embed images which are included in the html. So for example if the body is something like I would like to embed…
John Jiang
  • 11,069
  • 12
  • 51
  • 60
67
votes
10 answers

How to read text inside body of mail using javax.mail

i'm developing a client mail using javax.mail to read mail inside mail box: Properties properties = System.getProperties(); properties.setProperty("mail.store.protocol", "imap"); try { Session session =…
Jayyrus
  • 12,961
  • 41
  • 132
  • 214
60
votes
5 answers

How to download multiple files with one HTTP request?

Use case: user clicks the link on a webpage - boom! load of files sitting in his folder. I tried to pack files using multipart/mixed message, but it seems to work only for Firefox This is how my response looks like: HTTP/1.0 200 OK Connection:…
zakovyrya
  • 9,579
  • 6
  • 39
  • 28
54
votes
5 answers

Spring Controller @RequestBody with file upload is it possible?

I have a Controller like this and I want to submit a form with file uploading as well as some form data like label as shown below. Also, I want to do that using @RequestBody so I can use the @Valid annotation on the wrapper as more variables will be…
Yatin
  • 821
  • 1
  • 8
  • 15
50
votes
15 answers

How to upload images to server in Flutter?

I would like to upload a image, I am using http.Client() for making requests, static uploadImage(String id, File file) { var httpClient = createHttpClient(); Map headers = new Map(); …
karan vs
  • 3,044
  • 4
  • 19
  • 26
46
votes
2 answers

How to convert byte array to MultipartFile

I am receiving image in the form of BASE64 encoded String(encodedBytes) and use following approach to decode into byte[] at server side. BASE64Decoder decoder = new BASE64Decoder(); byte[] decodedBytes = decoder.decodeBuffer(encodedBytes); Now i…
Shoaib Chikate
  • 8,665
  • 12
  • 47
  • 70
41
votes
4 answers

Generating multipart boundary

I'm writing a script that uploads a file to a cgi script that expects a multipart request, such as a form on a HTML page. The boundary is a unique token that annotates the file contents in the request body. Here's an example…
August Lilleaas
  • 54,010
  • 13
  • 102
  • 111
40
votes
7 answers

Multipart File upload Spring Boot

Im using Spring Boot and want to use a Controller to receive a multipart file upload. When sending the file I keep getting the error 415 unsupported content type response and the controller is never reached There was an unexpected error…
Rob McFeely
  • 2,823
  • 8
  • 33
  • 50
39
votes
2 answers

Multipart HTTP response

The goal is for a Node.js / hapi API server to respond to a browser's AJAX request with two things: A media file (e.g. an image) A JSON object with metadata about the file These are two separate items only because binary data cannot easily be…
Seth Holladay
  • 8,951
  • 3
  • 34
  • 43
38
votes
4 answers

Browser support of multipart responses

I would like to create a HTTP response, using multipart/mixed, but I'm not sure which browsers support it; and if it's as convenient as it sounds, from the client's point of view. To be honest, I do not need specifically that content type. I just…
Diego Jancic
  • 7,280
  • 7
  • 52
  • 80
1
2 3
99 100