Skip to content

Commit

Permalink
Merge pull request #2034 from tf/fix-storybook-files
Browse files Browse the repository at this point in the history
Do not force local Paperclip storage in storybook seeds
  • Loading branch information
tf authored Dec 11, 2023
2 parents 8ed1010 + c149d8d commit 354f049
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions spec/support/pageflow/dummy/config/pageflow.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
Pageflow.configure do |config|
config.paperclip_s3_root = 'test-host'
s3_bucket = config.paperclip_s3_default_options.dig(:s3_credentials, :bucket)

config.paperclip_s3_default_options.merge!(
storage: :filesystem,
url: '/system/s3/:class/:attachment/:id_partition/:style/:filename',
path: ':rails_root/public:url'
)
if s3_bucket == 'com-example-pageflow-development'
config.paperclip_s3_root = 'test-host'

config.paperclip_direct_upload_options = lambda do |_|
{
url: '#',
fields: []
}
config.paperclip_s3_default_options.merge!(
storage: :filesystem,
url: '/system/s3/:class/:attachment/:id_partition/:style/:filename',
path: ':rails_root/public:url'
)

config.paperclip_direct_upload_options = lambda do |_|
{
url: '#',
fields: []
}
end
end
end

0 comments on commit 354f049

Please sign in to comment.