SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
Downloads are corrupt

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing
View previous topic :: View next topic  
Author Message
djc



Joined: 14 Jul 2008
Posts: 3

PostPosted: Aug 13, 2008 12:08 am    Post subject: Downloads are corrupt Reply with quote

Hello,

When downloading a file from the site, it speeds along until 99%, pauses for about 4 seconds, then completes. Problem is, the file is corrupt. If zip, it won't open, of bmp, won't display.

I am able to manually place a test.zip file in the public html and download it by direct URL just fine, so it isn't an Apache issue.

If I upload a zip file, then go into uploads/00000 and temporarily rename the most recent upload to xxxx.zip, it opens fine on the server, so uploading is ok. Integrity is lost on the download.

ideas?

win2k3/apache2.2.6/IE6.
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 1055
Location: Undisclosed location

PostPosted: Aug 13, 2008 12:26 pm    Post subject: Reply with quote

oh, Windows? Bad choice for web server man Smile
But anyway, try this quick fix: in index.cgi after line
Code:
open(my $in_fh,"$c->{target_dir}/$dx/$f->{id}") || die"Can't open source file";

add
Code:
binmode($in_fh);


this will enable binary mode for file descriptor, special function for windows.
Back to top
View user's profile Send private message Visit poster's website AIM Address
djc



Joined: 14 Jul 2008
Posts: 3

PostPosted: Aug 13, 2008 9:36 pm    Post subject: Reply with quote

that worked!

thanks much.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group