Can't access private files when using s3 as the private stream wrapper

Created on 1 December 2017, over 6 years ago
Updated 30 April 2024, about 2 months ago

Hello,

I am testing this module and when replacing the private file system with an Amazon S3 one using the settings in the settings.php file:

$settings['s3fs.use_s3_for_public'] = TRUE;
$settings['s3fs.use_s3_for_private'] = TRUE;
$settings['php_storage']['twig']['directory'] = '../storage/php/default';

After uploading a new private image, I can see the image in the Amazon S3 Bucket, but I obtain a 404 on the URL generated to access the image when viewing the node the image is attached to:

http://my_site.lxc/system/files/2017-12/my_image.png

It is ok for the public files, but KO for private ones.

I am missing something or is it a bug?

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇫🇷France Grimreaper France 🇫🇷

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.

  • 🇮🇹Italy trickfun

    Same error for me.
    File attached to webform has /system/files/webform/contact_us/52/alias_sedie-e-sgabelli_1.jpg path.

    Drupal 10.2.5
    S3 3.4
    webform 6.2.2

    my configuration
    $settings['s3fs.use_s3_for_public'] = TRUE;
    $settings['s3fs.use_s3_for_private'] = TRUE;

    thanks

Production build 0.69.0 2024