Hi all,
    Here I have a problem. I used CGI module to upload a file. But the problem is that the temp file created by CGI module is not getting deleted even after execution finished. It simply getting heaped in temp directory eating memory. Can anyone please give me a way through this???
    Here is a part of code I have written
 
use CGI;
use CGI qw (:standard);
use CGI::Carp qw (fatalsToBrowser);
 
$CGI::POST_MAX=1024 * 350; 
 my $QObject = new CGI;
 print $QObject->header;
 $file_name = $QObject->param('upload');
 
 open (FILE,">../xxx.jpeg") || die "cannot open the image file\n";
 while(read($file_name,$data,1024))
 {
  print FILE $data;
  }
 close(FILE);
 print "Success";
 
I also have one more problem. If I upload a Image file, the image will be corrupted in the uploaded file. Why is this hapenning?
Any help is hugely appriciated.
Thanx in advance
Regards
Srinidhi Rao
Robosoft Technologies
E-mail: [EMAIL PROTECTED]
www.robosoftin.com

Reply via email to