in reply to Uploading a file
Okay, now I can upload the file, I can wiew it in the browser (if i just print $buffer)
but the file i save is somehow corrupt, i can not open it either in the browswer or in Photoshop. ('Coud not open the document because of a problem parsing the JPEG data'). Suggestions? :) /wonkomy $FileHandle = $query->param('bild'); print "$filehandle"; open OUTFILE, '>huvudnyhet.jpg' or die "Couldn't open output file: $ +!\n"; while ($Bytes = read($FileHandle,$Buffer,1024)) { $BytesRead += $Bytes; print OUTFILE $Buffer; } warn "Received $BytesRead bytes"; close OUTFILE;
|
---|
Replies are listed 'Best First'. | |
---|---|
(jcwren) RE: Re: Uploading a file
by jcwren (Prior) on Jun 11, 2000 at 18:43 UTC | |
by wonko (Pilgrim) on Jun 11, 2000 at 18:47 UTC | |
by Anonymous Monk on Nov 09, 2002 at 05:04 UTC | |
by BrowserUk (Patriarch) on Nov 09, 2002 at 06:03 UTC | |
by ParanoidAndroid (Acolyte) on Apr 15, 2003 at 04:14 UTC |
In Section
Seekers of Perl Wisdom