• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic