Redirect to private file drops filename

Created on 27 March 2022, over 2 years ago
Updated 11 August 2024, 3 months ago

Problem/Motivation

I've moved a lot of public files into a private space and would like to add redirects from those original public locations. However, when redirecting to a private file the filename is lost upon download - the user sees just files, sometimes with the original file extension.

Steps to reproduce

Redirecting a public file to a private file can be done by adding a redirect, eg from /sites/default/files/2021-03/my_document.docx to /system/files/2021-03/my_document.docx. However once submitted this is saved as /system/files?files=2021-03/my_document.docx. Fetching this link, either via the redirect or directly, will download the file files.docx rather than my_document.docx.

πŸ› Bug report
Status

Active

Version

1.7

Component

Code

Created by

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