• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

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

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: 23689
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.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic