Revert to using Paperclip's filesystem storage, and fix dangling records in remove_remote (#8339)
* Fix uncaching worker * Revert to using Paperclip's filesystem backend instead of fog-local fog-local has lots of concurrency issues, causing failure to delete files, dangling file records, and spurious errors UncacheMediaWorker
This commit is contained in:
parent
d98de8ada7
commit
f06fa09962
4 changed files with 5 additions and 13 deletions
|
@ -74,14 +74,10 @@ elsif ENV['SWIFT_ENABLED'] == 'true'
|
|||
fog_public: true
|
||||
)
|
||||
else
|
||||
require 'fog/local'
|
||||
|
||||
Paperclip::Attachment.default_options.merge!(
|
||||
fog_credentials: {
|
||||
provider: 'Local',
|
||||
local_root: ENV.fetch('PAPERCLIP_ROOT_PATH') { Rails.root.join('public', 'system') },
|
||||
},
|
||||
fog_directory: '',
|
||||
fog_host: ENV.fetch('PAPERCLIP_ROOT_URL') { '/system' }
|
||||
storage: :filesystem,
|
||||
use_timestamp: true,
|
||||
path: (ENV['PAPERCLIP_ROOT_PATH'] || ':rails_root/public/system') + '/:class/:attachment/:id_partition/:style/:filename',
|
||||
url: (ENV['PAPERCLIP_ROOT_URL'] || '/system') + '/:class/:attachment/:id_partition/:style/:filename',
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue