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

The issue is explained here: http://kb.mozillazine.org/Filenames_with_spaces_are_truncated_upon_download

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',
  );

Comments

Title:mime headers causing firefox to truncate filenamesMime 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.