Thomas Gries | 22 Jul 2012 11:29
Picon
Favicon

Upload files: a simple progress bar ?

Question:

Why don't we have a simple progress bar (in the core) when uploading files ?
What would you recommend me to use ?

Many frameworks are available.
See for example ownCloud http://owncloud.org/ http://gitorious.org/owncloud
Daniel Friesen | 22 Jul 2012 13:05

Re: Upload files: a simple progress bar ?

On Sun, 22 Jul 2012 02:29:51 -0700, Thomas Gries <mail <at> tgries.de> wrote:

> Question:
>
> Why don't we have a simple progress bar (in the core) when uploading  
> files ?
> What would you recommend me to use ?
>
> Many frameworks are available.
> See for example ownCloud http://owncloud.org/  
> http://gitorious.org/owncloud

PHP handles uploads itself before running the script. So there is no way  
to do server side upload monitoring.
And we do normal form uploads so there is no way to do it in the browser.  
(You need to use some not-so-widly supported recent apis to do this with  
ajax).

--

-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
Chad | 22 Jul 2012 14:07
Picon

Re: Upload files: a simple progress bar ?

On Sun, Jul 22, 2012 at 5:29 AM, Thomas Gries <mail <at> tgries.de> wrote:
> Question:
>
> Why don't we have a simple progress bar (in the core) when uploading files ?

Because there's not a "simple" way of doing it. Every solution I've seen
over the years has either been kludgy (using iframes or some such
nonsense) or requires something like flash. Supposedly this is easier
with the file upload API in HTML5 (says Google), but this isn't supported
across all browsers yet.

> What would you recommend me to use ?
>

Your browser status bar. It's told me the progress of my uploads
for 10+ years now.

> Many frameworks are available.
> See for example ownCloud http://owncloud.org/ http://gitorious.org/owncloud
>

Useless link. Could you link to the source that uses it so we don't
have to search through 15 git repos to find it?

-Chad
Thomas Gries | 22 Jul 2012 14:27
Picon
Favicon

Re: Upload files: a simple progress bar ?

search for "jquery upload progress bar"

there are many solutions which are based on "standards"
I quickly found this

http://blueimp.github.com/jQuery-File-Upload/

"No browser plugins (e.g. Adobe Flash) required:
The implementation is based on open standards like HTML5 and JavaScript
and requires no additional browser plugins.
Graceful fallback for legacy browsers:
Uploads files via XMLHttpRequests if supported and uses iframes as
fallback for legacy browsers.
HTML file upload form fallback:
Shows a standard HTML file upload form if JavaScript is disabled."

Worth to be tested become a project for this (rest) summer ?
Dmitriy Sintsov | 22 Jul 2012 15:16
Picon
Favicon

Re: Upload files: a simple progress bar ?

On 22.07.2012 16:07, Chad wrote:
> On Sun, Jul 22, 2012 at 5:29 AM, Thomas Gries <mail <at> tgries.de> wrote:
>> Question:
>>
>> Why don't we have a simple progress bar (in the core) when uploading files ?
> Because there's not a "simple" way of doing it. Every solution I've seen
> over the years has either been kludgy (using iframes or some such
> nonsense) or requires something like flash. Supposedly this is easier
> with the file upload API in HTML5 (says Google), but this isn't supported
> across all browsers yet.
>
>> What would you recommend me to use ?
>>
> Your browser status bar. It's told me the progress of my uploads
> for 10+ years now.
Only Chrome shows precise and smoothly updated percentage of POST upload 
data sent in status bar. Firefox requires some addon for that:
https://addons.mozilla.org/en-us/firefox/addon/uploadprogress/
Perhaps one could detect and use HTML5 API when available (there are 
growing numbers of such browsers installations every day).

Although it's really strange why browser's download windows are so much 
more advanced than their upload bars. Perhaps not many people are 
uploading stuff.

Dmitriy
Platonides | 22 Jul 2012 15:45
Picon

Re: Upload files: a simple progress bar ?

On 22/07/12 15:16, Dmitriy Sintsov wrote:
> On 22.07.2012 16:07, Chad wrote:
>> Your browser status bar. It's told me the progress of my uploads
>> for 10+ years now.
> Only Chrome shows precise and smoothly updated percentage of POST upload
> data sent in status bar. Firefox requires some addon for that:
> https://addons.mozilla.org/en-us/firefox/addon/uploadprogress/
> Perhaps one could detect and use HTML5 API when available (there are
> growing numbers of such browsers installations every day).
> 
> Although it's really strange why browser's download windows are so much
> more advanced than their upload bars. Perhaps not many people are
> uploading stuff.
> 
> Dmitriy

I see several bugs for Mozilla to implement that... since 2004:
https://bugzilla.mozilla.org/show_bug.cgi?id=243468
https://bugzilla.mozilla.org/show_bug.cgi?id=249338
https://bugzilla.mozilla.org/show_bug.cgi?id=253105
https://bugzilla.mozilla.org/show_bug.cgi?id=598566
Thomas Gries | 22 Jul 2012 16:12
Picon
Favicon

Re: Upload files: a simple progress bar ?


>> See for example ownCloud http://owncloud.org/ http://gitorious.org/owncloud
>>
> Useless link. Could you link to the source that uses it so we don't
> have to search through 15 git repos to find it?
ownCloud appears indeed to use the one I mailed in my other mail
https://gitorious.org/owncloud/owncloud/blobs/master/apps/files/js/jquery.fileupload.js

Gmane