Authenticated user denied access to images from ImageSelect element when in private files dir

Created on 11 April 2023, almost 2 years ago
Updated 26 May 2023, over 1 year ago

Webform latest 6.1^ on latest drupal 9.5.7.

I have "Default download method" set to private files dir at web/admin/config/media/file-system
Private files dir is outside the drupal root (at same level of /web).

I have an ImageSelect element and the images path in the element config is sth like: /web/system/files/webform/myimages/123.png

If accessing the form as admin I can see the images with no problem.
If accessing as an authenticated user who can create and view own submission, the images aren't displayed and if I try to right click on an image and open in a new tab it gives Access Denied.

No such issue if I set the images path to point to public web/sites/default/files (while still the "Default download method" set to private in File System settings) . But then, the selected images don't show on the submission results page and when I right click on them and open in a new tab I get page 404 and wrong link like:

https://mysite.tld/web/admin/structure/webform/manage/MyWebform/results/...

πŸ› Bug report
Status

Closed: outdated

Version

6.1

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