[Catalyst] Upload progress meter
Wade.Stuart at fallon.com
Wade.Stuart at fallon.com
Fri Feb 29 20:16:03 GMT 2008
Bill Moseley <moseley at hank.org> wrote on 02/29/2008 01:30:38 PM:
> So I have a file upload page and an ajax-updated progress meter. Not
> unlike the UploadProgress plugin.
>
> The progress meter works fine while transferring the file.
>
> There's also some processing that happens to the file after the upload
> is complete (and before returning the response) and during that
> processing I update the JSON that is returned.
>
> But, the progress meter isn't showing that post-upload status.
> My guess is once the browser has sent all the file data that it stops
> processing the ajax requests. Can anyone confirm that's what is
> happening?
This depends, if you are submitting a passthrough form for the upload
directly the page will reload after the upload is done. If you are doing a
ajax submit this could also be the case depending on how your framework
handles the form post. If you are posting to an iframe this problem is most
likely in your js update progress event loop. It would help if you strip
out the offending code blocks/template and js and post.
>
> Another question about upload progress meters. A seemingly common way
> to handle the upload progress is to submit the form in an iframe. Are
> there some browsers that require that? That is, won't work with the
> UploadProgress method of submitting the form and continuing to run the
> ajax to check the progress?
I have been bitten by this -- safari seems to _not_ allow updates to dom
while a form (with upload) is being posted unless you post to an iframe. I
am sure there are others.
>
> I'm not a fan of the iframe method. The examples I've tried online
> are often poorly implemented. A few that I tried failed to stop
> making ajax requests after the file was uploaded.
Well the YUI framework upload progress does not use an iframe (directly at
least -- it may do so in the js code) and works on safari. The problem is
this uses a flash part for file select and upload so it may not be
acceptable to you.
My goal is to get a very flexible (bulletproof) upload progress plugin.
IMHO it should support fall back to normal form post if js is not available
and work across all browsers out of the box. Also I would like to extend it
to allow multi file select ala js or flash via config. I am still digging
into the current uploadprogress plugin to make it work for my needs, but I
would like to get it upadted to just generally work (to be fair it does
work for most cases right now, just not on specific browsers such as
safari).
A secondary problem I have is that http uploads do not support files larger
than 2gb (with some very limited exceptions based on browser/server
combos). I would have loved to see yui's flash based uploader work around
this somehow but I guess there is no way to do so yet.
-Wade
-Wade
More information about the Catalyst
mailing list