This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
How do I configure OctoberCMS to revert to using my server's local filesystem having been set up to use Amazon S3 for a while? I've retrieved all my files from the S3 bucket and now have a folder with the following subfolders:
- media
- meta
- pages
- uploads
I've copied these folders to /storage/app
and then edited /config/fileystems.php
to have the following config:
return [
'default' => 'local',
'cloud' => 'local',
disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'url' => 'storage/app',
],
'cache' => [
'driver' => 'local',
'root' => storage_path('cms/cache'),
'url' => 'storage/cms/cache/',
],
];
I've also edited /config/cms.php
set the storage
config to the following:
'storage' => [
'uploads' => [
'disk' => 'local',
'folder' => 'uploads',
'path' => '/storage/app/uploads',
'temporaryUrlTTL' => 3600,
],
'media' => [
'disk' => 'local',
'folder' => 'media',
'path' => '/storage/app/media',
],
],
I used a fresh install of OctoberCMS as a reference (along with the online docs).
However images now don't render despite being present on the file system (and with the correct permissions). I have my suspicions this is something to do with the cache
setting. Links to images only contain the host/domain name part i.e. https://mysite.com/
rather than previously https://mysite.com/storage/cms/cache/....
.
I've stopped/started apache, forced Chrome (in devtools) to "Empty cache and hard reload" and Disabled Cache in the Network tab, etc but I am not having much joy.
I've also tried running php artisan cache:clear
and also removing the cache
entry from the filesystem.php config.
Thanks for reading,
Kevin
Last updated
mjauvin said:
try changing
disks['local']['url']
to'/storage/app'
(i.e. prefix with "/")
Thanks for the response. I've tried this as well but still no dice.
Any chance you could approve my post, it seems to be marked as "Unapproved" hiding it from other readers.
Thanks,
Kevin
it's not your post that's not approved, it's your account. Write to hello@octobercms.com about this.
Solved! Turns out the site is using the Glide plugin and it was configured (in config/Glide.php
to use S3 rather than local
as defined in filesystems.php
.
1-6 of 6