# Change file name in file download

**URL:** <https://forum.kirupa.com/t/change-file-name-in-file-download/285820>\
**Category:** programming\
**Created:** [April 6, 2009, 11:44pm UTC](https://forum.kirupa.com/t/change-file-name-in-file-download/285820 "2009-04-06T23:44:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [April 6, 2009, 11:44pm UTC](https://forum.kirupa.com/t/change-file-name-in-file-download/285820/1 "2009-04-06T23:44:04Z")

</div>

I have a tabls of longblobs which hold PDF data - I have download pages that live here:

[http://localhost/messages/all/52/notes/pdf](http://localhost/messages/all/52/notes/pdf)  
[http://localhost/messages/all/52/recording/mp3](http://localhost/messages/all/52/recording/mp3)

I set my content-type to PDF or MP3, but the filename comes out as just ‘pdf’ or ‘mp3’ - is there a way to force it to come out as ‘notes.pdf’ and ‘recording.mp3’?

Thanks 🙂

EDIT: Never mind:

[COLOR=#000000][COLOR=#0000BB]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]‘Content-Disposition: attachment; filename=“downloaded.pdf”’[/COLOR][COLOR=#007700]);

[http://ca2.php.net/header](http://ca2.php.net/header)

😃  
[/COLOR][/COLOR]
