XUpload - progress bar keeps going over 100%

Message
Author
amirm
Posts: 5
Joined: Jul 04, 2007 1:10 am

progress bar keeps going over 100%

#1 Postby amirm » Jul 04, 2007 1:12 am

When I upload an flv file the progress bar goes over 100%, sometimes 120%, then when the upload is finished , it jumps back to 100% before redirecting.

amirm
Posts: 5
Joined: Jul 04, 2007 1:10 am

#2 Postby amirm » Jul 04, 2007 1:39 am

I know why now but have no solution, the file size is detected wrong, the flv file is 11 MB , but the detected size when uploading is 10MB.

I'm using pro version 2.4, could 2.5 have fixed this issue ?

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm

#3 Postby PilgrimX182 » Jul 04, 2007 6:35 am

This is interesting. First time hear about problem like this. What browser do you use? Tested in sevaral browsers - same effect?

I'm not sured...but probably you have mod_gzip enabled on your server and flv zipping before sending and compressing to 10 instead of 11 Mb.
Can you PM me URL to your upload form to test myself if possible?

amirm
Posts: 5
Joined: Jul 04, 2007 1:10 am

#4 Postby amirm » Jul 06, 2007 9:09 am

I Pmd you the URL.

I also did some more tests with over file types such as wmv, it seems there is no problem for smaller files since their sizes are detected correctly. But for larger files bigger than 10 MB or so there is a discrepancy in the detected size and the actual size.

ex. 10.9 MB .flv detected as 10.0
17.7 MB .mov detected as 17.0

Also, no mod_gzip enabled since I have the following in root folder of the site in .htaccess

<IfModule mod_security.c>
SetEnvIfNoCase Content-Type \
"^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
</IfModule>
<IfModule mod_gzip.c>
mod_gzip_on No
</IfModule>

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm

#5 Postby PilgrimX182 » Jul 09, 2007 5:58 am

Hmmm...uploaded 5Mb flv file to your server - filesize detected exactly the same. Try other computers or ask your friends from another networks try this.
Check out logs.txt file in xupload folder, total upload size taken from request header printing there. But it should be more then filesize(including headers and form data), not less.
My only idea is still that upload data gzipping somewhere (maybe some network accelerator). AVIs zipping badly so no effect for them, FLV are better. Try to upload FLV containing '000000....' - if it's zipping then it will be compressed very good and you'll see > 1000%.

You can update up to 2.5 version for free: http://www.sibsoft.net/forum/customers- ... -t103.html

amirm
Posts: 5
Joined: Jul 04, 2007 1:10 am

#6 Postby amirm » Jul 10, 2007 8:09 pm

Like I said, small files are detected properly, it is larger files than fail.

I did what you said and looked at logs and did another test, here is what happened:

I uploaded quicktime .mov file:

- size 18609761 bytes
- upload log reports size as 18610382 bytes

I zipped the same .mov file with best zip compression

- size 18490535 bytes
- upload log reports size as 18491159 bytes

In both cases, progress bar reports size as 17 MB.

I also asked friends in different networks to upload the same file and they got the same result.

Could the progress bar functions be rounding off the size too much and losing precision?

amirm
Posts: 5
Joined: Jul 04, 2007 1:10 am

#7 Postby amirm » Jul 10, 2007 8:41 pm

Hmm... I think the rounding off might be the problem...

I changed

$totalKB = int($totalKB/1024); # Convert to Mb if > 10Mb

to

$totalKB = ceil($totalKB/1024); # Convert to Mb if > 10Mb

in upload_status.cgi and it seems to work better now.

At least the progress will never go over 100% if you over-report the size.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm

#8 Postby PilgrimX182 » Jul 11, 2007 7:01 am

Hmmm....can be but strange. My uploads are too fast to notice this in the end of upload.
Then better use

Code: Select all

$totalKB = sprintf("%.1f",$totalKB/1024);


This will round much accurately and keep 1 sign after point.


Return to “XUpload”



Who is online

Users browsing this forum: No registered users and 0 guests