in reply to File uploads, CGI::Application, File::TEMP and Uploadify
...but I can't save the file.
The temp file is automatically unlinked (when the handle goes out of scope), unless you tell it otherwise with UNLINK => 0. Also, you don't need to open another TEMPFILE handle (which, btw, doesn't help with the unlink issue), as $tmp already is an opened handle to the file... I.e. try
my $tmp = File::Temp->new( DIR => $self->cfg('UploadDirectory'), SUFFIX => '.zip', UNLINK => 0, ); # warn $tmp; # stringification gives filename ... print $tmp $buffer;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File uploads, CGI::Application, File::TEMP and Uploadify
by Anonymous Monk on May 10, 2010 at 09:30 UTC | |
by almut (Canon) on May 10, 2010 at 09:51 UTC |