Firefox truncates filenames that contain spaces at the first occurrence of a space if private filesystem is enabled.

The issue is explained here:

I think the end of function filefield_file_download($file) needs to be altered to enclose the filename in quotes, like this:

  return array(
    'Content-Type: '. $type .'; name='. $name,
    'Content-Length: '. $file->filesize,
    'Content-Disposition: '. $disposition .'; filename="'. $name . '"' ,
    'Cache-Control: private',


quicksketch’s picture

Title: mime headers causing firefox to truncate filenames » Mime headers causing Firefox to truncate filenames with spaces
Status: Active » Fixed

Great catch! Quotes applied. Note that it's a good idea to install the Transliteration module to prevent spaces and special characters entirely in filenames (since they'll be used in URLs).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.