Hi,

Nice module and working fine. I noticed it does not send the Content Length when a file is requested so firefox is showing unknown file length. I'm not sure what to put in the header since I never worked with Content Length. I can state that if I put a Content Length with a filesize it does force it to show but that is only for one file.

Comments

johnhanley’s picture

This is a legitimate feature request, but I'm not anticipating another release in the near future. In the meantime you could add the file size to the header via hook_file_download in a custom module. For example (untested):

<?php
function mymodule_file_download($filepath) {
  $length = filesize($filepath);
  return array("Content-Length: $length;\n");
}
?>
skylord’s picture

Correct piece of code:

function MYMODULE_file_download($filepath) {
  return array("Content-Length: " . filesize(file_create_path($filepath)));
}
johnhanley’s picture

Assigned: Unassigned » johnhanley
Status: Active » Fixed

I just rolled this fix into version 6.x-1.2. Thanks again for the bringing it to my attention.

Status: Fixed » Closed (fixed)

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