Issue getting files to be copied into and propagated to containers

Created on 8 January 2015, almost 10 years ago
Updated 14 May 2023, over 1 year ago

I'm running a site with Drupal Commons installed and want to store user uploaded images and media associated with posts in a separqate Filesystem for now (and ultimately Amazon S3 storage). I looked at the Storage API module and thought that this would be exactly what I needed, but I'm having difficulties getting it to work - which may just be me misunderstanding how to configure it. I'd appreciate any help and suggestions. Here's what I've done:

I've downloaded, installed and enabled the Storage API module and also the Core Bridge module.
This creates a default Class of Everything and a Container of Filesystem which points to sites/default/files/storage
I've changed the field settings for File (so everywhere where used) to use Upload destination of Storage Class of Everything (instead of Public). I've left Display File unchecked and Files displayed by default also unchecked.
I've left the Configuration -> File System as was currently configured, with a path for Public file system path only and no Private file system path. The default download method is Public local files served by webserver.

When I create a new Commons Post, I see that the file is created under /sites/default/files/media, under sites/default/files/storage and sites/default/files/styles/media_thumbnail/public/media/skyatnight4.jpg (presumably the thumbnail). If I then run cron, it removes the file from the sites/default/files/storage container. I don't understand this part.

I then setup an additional Container called FileSystem_2, pointed this to sites/default/files/storage_2 and set this as an additional container for the existing class of Everything. I repeated the post test with a different named image file and I see the same results as above. The file is initially saved into the three locations I identified, but when I run cron, the file is removed from the storage location and not propagated to the storage_2 location.

I've also tried a number of other configuration settings, specifying a private file system path for Configuration -> File system and then specifying the Default download method to be Private local files, rather than Public local files, however this creates an issue with css stylesheets used by Drupal Commons not being able to access css files it needs. It also didn't change the behaviour I was seeing. I've googled to see if I can find any further documentation or examples from others and can only find information relating to Amazon S3 setup, which will be my next step in the configuration (essentially to change my FileSystem_2 container to be Amazon S3). However given the behaviour I'm seeing currently, I feel I've missed something or have something configured incorrectly. I'd appreciate any suggestions or configuration settings advice here please.

Many thanks

💬 Support request
Status

Active

Version

1.6

Component

Code

Created by

🇨🇦Canada lawrencey

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