Commit 4821aa6c251a1a2eb4f1fac7bf0f2897a435b48b
1 parent
a699ebdb
Exists in
master
and in
4 other branches
skip protection to aws3
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
app/controllers/files_controller.rb
app/uploaders/attachment_uploader.rb
... | ... | @@ -21,6 +21,10 @@ class AttachmentUploader < CarrierWave::Uploader::Base |
21 | 21 | end |
22 | 22 | |
23 | 23 | def secure_url |
24 | - "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" | |
24 | + if self.class.storage == CarrierWave::Storage::File | |
25 | + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" | |
26 | + else | |
27 | + url | |
28 | + end | |
25 | 29 | end |
26 | 30 | end | ... | ... |