commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Evetts" <>
Subject Re: Help: When Does An Upload Actually Occur
Date Wed, 22 Feb 2006 16:40:21 GMT

I think you can find the answer in the RFC ( The actual file content is encoded
into the form. By the time you are processing the request, the file content
(and al other form data) is in a temporary file on the server.

Also, if you're planing to post binary data, you need to encode it on the
client side and decode it on the server. I used base64 encoding. I'm not
sure how a browser encodes; I'd written an applet to create the whole form,
so I have maximum control (and responsibility).

-Greg Evetts

On 2/22/06, <>
> I apologize if this has already been received once before, but I think I
> sent it incorrectly, so here it is again:
> Please excuse my ignorance, but I can't seem to find when the file upload
> occurs.  Does it occur when the user submits the file/form and the file is
> stored to the temp file?  Or is when file is submitted, details such as name
> and size are submitted, but the file is still on the user's PC waiting to be
> upload?
> I'm look at building a form that accepts large files (100+ MB).  I want to
> build a progress bar, and request small chunks of the file, and updating the
> progress bar every time a chunk is successfully uploaded.  In the user
> guide, it shows writing at:
> // Process a file upload
> if (writeToFile) {
>     File uploadedFile = new File(...);
>     item.write(uploadedFile);
> }
> So I guess to restate my question, is the user's file already uploaded to
> "item" and is waiting to be written to a permanent file?
> Or is the "item" variable just a reference to the file on the user's PC,
> and is actually uploaded when you call item.write()?
> Any clearification on this is greatly appreciated.  :)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message