Posted by jdp.168 on December 16, 2008 at 8:28pm
Hello all,
I know there are alot of ajax/php upload progress bars out there, but they're either complicated, unreliable, or just generally don't fit my needs. Thus, i'm making my own.
One problem I'm running into though, is how to check the local file size as compared to the uploaded file size.
I can check and display the total uploaded size (ie, 437kb uploaded so far...), but to get the percent, I have to know the total size - BEFORE it's fully uploaded. I would like to say "437kb of 932kb uploaded so far"... but how do I get the "932" from the local file?
I know it's possible (most others do this) - I just can't figure out how.
any hints?
Thanks
Comments
I think they are using Flash
I think they are using Flash to determine the local file size, not JS, but that's how some of the best progress bar uploaders work, as far as I understand.
Dave
SWF Upload
The best/most popular solution that I know of is SWFUpload. It's a great piece of software that does some crazy merging of JS and Flash to accomplish this goal, plus simultaneous multi-file selection and a nice progress bar. There's a Drupal project for it, but it's been defunct for a long time. It'd be great to get it working, especially as a File Field CCK widget.
SWFUpload module has a D6
SWFUpload module has a D6 release since a few months. I'm planning to / already working on CCK fields. Any ideas would be much appreciated!