Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Perhaps what I'm trying to do in one step requires two? (copying the file over and renaming it).my $location = "/home/name/public_html/header.gif"; my $temp_folder_path = "/home/name/public_html/test.gif"; copy("$location","$temp_folder_path\test.gif");
Along with this I need your monkly advice. This is part of a file downloading script for a members section. It takes a list of files from the database and then writes a random file name for them. This is to prevent people from giving the actual URLs of our files out since the filenames will always be different they won't be able to.
By having a list of links to push and then have the script copy a file from one part of the server to the other seems a little costly. Especially if they have say 10MB files or greater. Then I think we're totally doing something wrong.
Our first idea was to copy the file they selected with a random name to a /temp/ folder. But again the problems we are having is 1) it doesn't seem to be working 2) the overhead of large files and 3) how would you delete the file once it's been opened? We want it there just long enough so they can view it on their screen but they can't reload it without going through the link process again.
Any and all advice on this would be very much appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copying files
by eyepopslikeamosquito (Archbishop) on Feb 14, 2005 at 22:15 UTC | |
|
Re: Copying files
by Animator (Hermit) on Feb 14, 2005 at 22:08 UTC | |
by Anonymous Monk on Feb 14, 2005 at 22:12 UTC | |
by Anonymous Monk on Feb 14, 2005 at 22:47 UTC | |
by chromatic (Archbishop) on Feb 14, 2005 at 23:10 UTC | |
by Anonymous Monk on Feb 15, 2005 at 04:13 UTC |