File move doesn't take into account if the file is in the root of file scheme

Created on 27 June 2023, over 1 year ago
Updated 31 January 2024, 10 months ago

Problem/Motivation

If a file is uploaded to the root of a stream, such as public or private, with no sub-directory, an extra / is added after the stream wrapper. In the case of private files Drupal then fails to serve them.

Steps to reproduce

* Create a file field with no subdirectory (ideally use private file scheme)
* Upload a file that requires transliteration
* File is stored with a uri private:///
* File gives 403 as it can't be found

Proposed resolution

* Check if the directory already ends in /
* Alternative: Check if the directory is a stream wrapper

Remaining tasks

* MR opened already
* Confirm approach
* Testing

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom alexj12

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024