Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
file_get_content_headers also sets the 'Content-Disposition'
and - if it acts later than file_force and thinks that the file is an $inline
type, it sets the 'Content-Disposition'
to 'inline'
.
At least in one of our sites, both file.module and file_force.module have a system weight of 0. This meant that file_force attachments were being shown in the browser and not downloaded.
Setting the weight explicitly on file_force solved this problem for us:
UPDATE `system` SET `weight` = '10' WHERE `name` = 'file_force';
Comments
Comment #1
arski CreditAttribution: arski commentedaight, this was already being set for new installs, but not updated for d6 upgrades, which I assume is where you're coming from. Fixed now.