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.
When a user attaches a file with % character in the file name, the file uploads correctly, but cannot be viewed and results in a 404. This is because file_create_url() in file.inc does not urlencode the file path and the file url is incorrect.
You can reproduce this problem with the dummy files I have attached to this issue report. The file letter.txt can be downloaded successfully, but letter %22my%22.txt results in a 404.
Comment | File | Size | Author |
---|---|---|---|
letter %22my%22.txt | 7 bytes | abrao | |
letter.txt | 7 bytes | abrao |
Comments
Comment #0.0
abrao CreditAttribution: abrao commentedAdded note about public downloads
Comment #1
abrao CreditAttribution: abrao commentedThis problem exists in all 6.x versions. Any chances of fixing this, so that we don't have to touch core?
Comment #1.0
abrao CreditAttribution: abrao commentedremoved public download message