Private file downloads get truncated

Created on 29 September 2007, over 17 years ago
Updated 28 March 2025, 9 days ago

I changed the file access from Public to Private in my Drupal installation, and now certain images get truncated when I try to download them. They didn't get truncated when I downloaded them publicly.

They don't all get truncated at the same number of bytes either. For example:

  • DSCN5553.preview.jpg ( bytes), when accessed via ?q=system/files/images/DSCN5553.preview.jpg, the browser only returns the first bytes.
  • DSCN5555.preview.jpg ( bytes), when accessed via ?q=system/files/images/DSCN5555.preview.jpg, the browser only returns the first bytes.

Does anyone have a clue as to what might be going on here?

The code for file_transfer() looks very simple and straightforward; I don't really know how I would debug it, though, as there is no opportunity to write anything to an HTML page (since it's a binary file that's being downloaded).

Any help would be much appreciated!

✨ Feature request
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component

file system

Created by

πŸ‡¨πŸ‡¦Canada paul2

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024