Derleek Posted August 8, 2009 Share Posted August 8, 2009 Hi there. I need to change the 'save as' value of an image file when a user right clicks to download it. Is this even possible? Link to comment https://forums.phpfreaks.com/topic/169393-solved-rename-a-file-on-download/ Share on other sites More sharing options...
Derleek Posted August 8, 2009 Author Share Posted August 8, 2009 Let me clarify. I am sending a secure .jpg (secured w/ .htaccess) to my users using the header() and readfile() commands Link to comment https://forums.phpfreaks.com/topic/169393-solved-rename-a-file-on-download/#findComment-893782 Share on other sites More sharing options...
zq29 Posted August 8, 2009 Share Posted August 8, 2009 I haven't tested this, but it might do the trick... header('Content-Disposition: inline; filename="'.$filename.'"'); Link to comment https://forums.phpfreaks.com/topic/169393-solved-rename-a-file-on-download/#findComment-893812 Share on other sites More sharing options...
Derleek Posted August 12, 2009 Author Share Posted August 12, 2009 That is essentially what I did =) Link to comment https://forums.phpfreaks.com/topic/169393-solved-rename-a-file-on-download/#findComment-896718 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.