In case of cancel uploading, there is a temporary file in /tmp directory.
It is a problem to me. If someone cancel uploading a file, the temporary file must be deleted.
If anyone has a good idea, please inform me of the solution.
Thanks in advance.
set a cron job that erase any file that mega upload uses and that has not been modified for... let's say, one hour?
Clearing up the temp files without a cron job is fairly easy - just move responsibility for getting rid of the temp files to upload.cgi.
I've modified my upload.cgi by adding the following lines to the end:
eval { unlink "$user_dir/flength"; unlink "$user_dir/postdata"; rmdir $user_dir; };
And progress.cgi to assume the upload has finished if it can't find the files, unless it's within five seconds of the upload start time.
Log in to post a comment.
In case of cancel uploading,
there is a temporary file in /tmp directory.
It is a problem to me.
If someone cancel uploading a file, the temporary file must be deleted.
If anyone has a good idea, please inform me of the solution.
Thanks in advance.
set a cron job that erase any file that mega upload uses and that has not been modified for... let's say, one hour?
Clearing up the temp files without a cron job is fairly easy - just move responsibility for getting rid of the temp files to upload.cgi.
I've modified my upload.cgi by adding the following lines to the end:
eval {
unlink "$user_dir/flength";
unlink "$user_dir/postdata";
rmdir $user_dir;
};
And progress.cgi to assume the upload has finished if it can't find the files, unless it's within five seconds of the upload start time.