• Post Reply Bookmark Topic Watch Topic
  • New Topic

How does multipart/form-data sends data over network during fileupload  RSS feed

 
venkata Silla
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Experts,

I would like to understand how does multipart/form-data works during file upload scenario's, Does it chunks the data from client to server while transferring the files ?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chunking - if any - is transparent and you'd have to check the options on your server and/or client to be sure.

Functionally speaking, a web request is a single unit - headers, cookies, form fields, uploads, everything is a single datastream unit. The multipart form uses special delimiters to inform the recipient where the the beginning and ending of the upload content is within the request datastream, but it's all transmitted as a single unit. That's one reason why upload progress bars have trouble working. The entire request has to be received before the webapp can respond to it.

More advanced configurations, such as the fileupload control in the JBoss RichFaces JSF tag library do funtion in ways that weren't part of the original HTTP spec. That particular control does support an upload progress bar. I'm pretty sure that it does do chunking and presumably is doing so via a lot of local Javascript support and/or AJAX.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!