I read some articles on net for sending the files using HTTP/(Ajax). While reading i found stuff like need to set BOUNDARY for the file etc.
I don’t understand what and why is this ? Can some one please help me understand this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In multipart form with
enctype="multipart/form-data, The client uses a boundry string that separates inputs field from the uploaded files and separation between different files. This is a string that is not present in any of the form’s submitted data, including the file data. The boundry helps the server to parse data correctly to separate input fields from file data, since all the data is sent in a single request.From rfc1867 section 3.3
A boundary is selected that does not occur in any of the data. (This selection is sometimes done probabilisticly.)
An example from the same RFC:
Suppose the server supplies the following HTML:
and the user types “Joe Blow” in the name field, and selects a text
file “file1.txt” for the answer to ‘What files are you sending?’
The client might send back the following data: