Gossamer Forum
Home : Products : DBMan : Customization :

HELP: garbaged uploaded file

Quote Reply
HELP: garbaged uploaded file
i used the file-upload mod and everything went fine. however, when i try to access the uploaded file (for example it is a word doc file), everything went as garbage Frown

how would i det. if i should pass it as a binary or ascii?
please help.
Quote Reply
Re: HELP: garbaged uploaded file In reply to
Hi JP!

btw, i am using an NT server. i read from jeffrey carnahan's page that the script he made does not run yet on NT. i hope your script does, anyway...

ztin

Quote Reply
Re: HELP: garbaged uploaded file In reply to
I rin win98, apache at home, offline. I also get garbage.

But, when i use upload script on my linux server everything works fine...

Do you use script off-line or online ?
Quote Reply
Re: HELP: garbaged uploaded file In reply to
Hi Cacan,

i use it offline for the meantime. but it shld work well online, shouldt it?

so, have you found a way to solve the garbaged upload problem???? i would surely be very grateful if you could share me what youve done so far.
Quote Reply
Re: HELP: garbaged uploaded file In reply to
Hi ztin,

AFAIK, there is no fix for garbage off-line, but it works great for me online on a Linux machine.

I think it has something to do with web server...
Quote Reply
Re: HELP: garbaged uploaded file In reply to
The file-upload mod has been tested using graphic files only on an Apache Unix server. I am pretty confident it will work under similar conditions. I don't know about any other conditions.


------------------
JPD





Quote Reply
Re: HELP: garbaged uploaded file In reply to
 
Hi ztin, could you please send the changes you make to file-upload ?!?

Tnx.
Quote Reply
Re: HELP: garbaged uploaded file In reply to
hi jp!

welcome back! Smile

i have added the binmode function in the file-upload.cgi and it's now working out fine.

i got the help from this url:
www.tneoh.zoneit.com.cgi/upload
Quote Reply
Re: HELP: garbaged uploaded file In reply to
hi cacan,

sorry for the delayed response....

anyway, here's my code:

after these lines,
eval {
unshift (@INC, $db_script_path);
require 5.003; # We need at least Perl 5.003
require "CGI_LIB.pl";
};

i added:
binmode(STDIN);
binmode(STDOUT);
binmode(STDERR);

then within this codes, i added the binmode function again:

while ($Bytes = read($File_Handle $Buffer,1024)) {
$BytesRead += $Bytes;
binmode(OUTFILE);
print OUTFILE $Buffer;
}


hope that solves your problem too!