Rename file before download. Dont even know where to start
Posted: Sun Jun 03, 2007 9:09 pm
I've made a private file upload site for myself and a few friends.
When a file is uploaded, I have the script change the file name to a random name. It then stores that name along with the user id and original file name in a database.
What I need to do now is when someone clicks to download the file I want it to show as as the original file name before they download it so they can save it as the original file name.
Example:
I upload "CarFun.mpeg".
After being uploaded, it's saved as "82bs88sns89ua.mpeg"
I click to download the file and I want it to say:
Save as: "CarFun.mpeg"
Any thoughts? I'm stumped.
When a file is uploaded, I have the script change the file name to a random name. It then stores that name along with the user id and original file name in a database.
What I need to do now is when someone clicks to download the file I want it to show as as the original file name before they download it so they can save it as the original file name.
Example:
I upload "CarFun.mpeg".
After being uploaded, it's saved as "82bs88sns89ua.mpeg"
I click to download the file and I want it to say:
Save as: "CarFun.mpeg"
Any thoughts? I'm stumped.