Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The permissions are correct for the upload directory. I don't get any warnings or errors in the apachelog, excluding the ones I put in for debugging. Any help would be great:)sub Upload{ my $self=shift; my $q=$self->query(); warn "In upload runmode"; my $buffer; my $bufsize=1024; my $bytes_retrieved=0; my $fh=$q->upload('upfile'); my $filename=$q->param('upfile'); my $tmp = File::Temp->new( DIR=$self->cfg('UploadDirectory'); SUFFIX=>'.zip'); warn "$tmp"; open (TEMPFILE, '>', \$tmp) || die $!; binmode TEMPFILE; while (read ($fh, $buffer, $bufsize)){ #warn "$buffer"; #i can see the file here print TEMPFILE $buffer; $bytes_retrieved += $bufsize; } close TEMPFILE; warn "now check the upload directory"; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File uploads, CGI::Application, File::TEMP and Uploadify
by almut (Canon) on Apr 29, 2010 at 15:11 UTC | |
by Anonymous Monk on May 10, 2010 at 09:30 UTC | |
by almut (Canon) on May 10, 2010 at 09:51 UTC | |
|
Re: File uploads, CGI::Application, File::TEMP and Uploadify
by Anonymous Monk on Apr 29, 2010 at 11:56 UTC | |
by Anonymous Monk on Apr 29, 2010 at 12:01 UTC |