Take the 2-minute tour ×  I'm using the following code to
download files:  $file_name = $_GET['file_name']; $file_size =
filesize( 'files/' . $file_name ); $file_type =
mime_content_type( 'files/' . $file_name );  header( 'Content-
Type: ' . $file_type ); header( 'Content-Length: ' . $file_size
); header( 'Content-Disposition: attachment; filename="' .
$file_name . '"' );  readfile( 'files/' . $file_name );  And it
works fine, I can download files. However, there is something
that bothers me. When I download a file with Firefox, the
download dialog always says that the file is a "Document", or
sometimes a "Preview Document", and never an image or a PDF or
whatever the file actually is. Any ideas?  Edit: I just tried
with a .svg file (mime type image/svg+xml) and the dialog box
correctly stated "Scalable Vector Graphics". But then I tried
with a .psd file (mime type image/x-photoshop) and got
"Preview.app Document". Weird. Anyone able to replicate the
problem? At this point I'm thinking it might be a Firefox is