0

If i need to upload text files say some text or xml file on server , it has to be multipart request. My question is why upload text file request need special treatment? why it can not be normal http request where file content is send as name value pair in POST request body .I am sure there must be some reason behind it.

user3198603
  • 5,528
  • 13
  • 65
  • 125
  • You want to put an entire file in the URL? Assuming there's no length limit to URL parameters, you could Base64 encode it, I suppose, but This is just not a good idea. Use multipart request. It's easy and you can do it using a library or just writing bytes out to the stream. – mttdbrd Mar 15 '14 at 14:53
  • @home You could Base64 encode it as I say above. It's insane to want to do so, but I suppose it is possible. – mttdbrd Mar 15 '14 at 14:57
  • possible duplicate of [What is http multipart request?](http://stackoverflow.com/questions/16958448/what-is-http-multipart-request) – home Mar 15 '14 at 15:00
  • https://www.ietf.org/rfc/rfc2388.txt – Sandeep Chatterjee Mar 15 '14 at 15:00

0 Answers0