[whatwg] File Upload Progress Event (Upload Progress)

On Sun, Sep 19, 2010 at 5:20 PM, Shiv Kumar <skumar at exposureroom.com> wrote:
> I?d like to propose that UAs should surface an bytes transferred event when
> a form is being submitted. With so many large files being uploaded using
> browsers today and every website that allows this having had to implement
> their own upload progress indicator I think the Html 5 spec should support
> this very common need.

It's already supported (pretty much) if you do the form submission in
JavaScript via XMLHttpRequest, in browsers that support all the shiny
new standards.  You can get the file from <input type=file> via a File
API, submit it via XHR, and get progress events from that.  I don't
think it makes much sense to provide events to script while a file is
being uploaded by the browser via a standard form submit.  At that
point, the user is already in the process of navigating away from the
page.

I do think browser UI for large uploads is terrible and needs to be
fixed.  For large uploads, they should display a prominent upload bar
(comparable in prominence to their display for downloads), and not let
the user navigate away without explicitly canceling the upload.  But
this is a question of UI, not HTML.

Received on Sunday, 19 September 2010 17:44:27 UTC