How to rename the original file before sending it to user
Posted
by
Manish Jangir
on Stack Overflow
See other posts from Stack Overflow
or by Manish Jangir
Published on 2012-09-04T19:29:18Z
Indexed on
2012/09/05
9:38 UTC
Read the original article
Hit count: 177
Actually I have some download link on my website something like "http://www.example.com/somesong.mp3". Now when user click on this link they get somesong.mp3 but I want to change it before they download. I found many scripts that made it possible but didn't get exact right script. Because I want that when the user clicks on download link the file downloading should be started just after the click with the new file name as I want to use.
But in all the scripts which I downloaded, first the php processing starts for a few minute (I think it depends on the file size) and then rename it. Is there a way to direct force the file in header with new file name.
Thanks.
© Stack Overflow or respective owner