Bump carrierwave
Carrierwave 3.0.4 cleans the original_filename after store, but we can still get the original filename from the file directly.
This commit is contained in:
parent
016b2f15c5
commit
541da9f682
3 changed files with 9 additions and 10 deletions
2
Gemfile
2
Gemfile
|
|
@ -83,7 +83,7 @@ gem "activerecord-import", "1.7.0"
|
||||||
|
|
||||||
# File uploading
|
# File uploading
|
||||||
|
|
||||||
gem "carrierwave", "2.2.4"
|
gem "carrierwave", "3.0.7"
|
||||||
gem "fog-aws", "3.19.0"
|
gem "fog-aws", "3.19.0"
|
||||||
gem "mini_magick", "4.12.0"
|
gem "mini_magick", "4.12.0"
|
||||||
|
|
||||||
|
|
|
||||||
15
Gemfile.lock
15
Gemfile.lock
|
|
@ -107,13 +107,12 @@ GEM
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
regexp_parser (>= 1.5, < 3.0)
|
regexp_parser (>= 1.5, < 3.0)
|
||||||
xpath (~> 3.2)
|
xpath (~> 3.2)
|
||||||
carrierwave (2.2.4)
|
carrierwave (3.0.7)
|
||||||
activemodel (>= 5.0.0)
|
activemodel (>= 6.0.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 6.0.0)
|
||||||
addressable (~> 2.6)
|
addressable (~> 2.6)
|
||||||
image_processing (~> 1.1)
|
image_processing (~> 1.1)
|
||||||
marcel (~> 1.0.0)
|
marcel (~> 1.0.0)
|
||||||
mini_mime (>= 0.1.3)
|
|
||||||
ssrf_filter (~> 1.0)
|
ssrf_filter (~> 1.0)
|
||||||
celluloid (0.17.4)
|
celluloid (0.17.4)
|
||||||
celluloid-essentials
|
celluloid-essentials
|
||||||
|
|
@ -266,7 +265,7 @@ GEM
|
||||||
concurrent-ruby (~> 1.1)
|
concurrent-ruby (~> 1.1)
|
||||||
webrick (~> 1.7)
|
webrick (~> 1.7)
|
||||||
websocket-driver (>= 0.6, < 0.8)
|
websocket-driver (>= 0.6, < 0.8)
|
||||||
ffi (1.15.5)
|
ffi (1.17.0)
|
||||||
ffi-compiler (1.0.1)
|
ffi-compiler (1.0.1)
|
||||||
ffi (>= 1.0.0)
|
ffi (>= 1.0.0)
|
||||||
rake
|
rake
|
||||||
|
|
@ -643,7 +642,7 @@ GEM
|
||||||
rubocop (>= 1.33.0, < 2.0)
|
rubocop (>= 1.33.0, < 2.0)
|
||||||
ruby-oembed (0.16.1)
|
ruby-oembed (0.16.1)
|
||||||
ruby-progressbar (1.13.0)
|
ruby-progressbar (1.13.0)
|
||||||
ruby-vips (2.1.4)
|
ruby-vips (2.2.1)
|
||||||
ffi (~> 1.12)
|
ffi (~> 1.12)
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
|
|
@ -698,7 +697,7 @@ GEM
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
ssrf_filter (1.1.1)
|
ssrf_filter (1.1.2)
|
||||||
state_machines (0.5.0)
|
state_machines (0.5.0)
|
||||||
string-direction (1.2.2)
|
string-direction (1.2.2)
|
||||||
swd (2.0.2)
|
swd (2.0.2)
|
||||||
|
|
@ -797,7 +796,7 @@ DEPENDENCIES
|
||||||
bootstrap-sass (= 3.4.1)
|
bootstrap-sass (= 3.4.1)
|
||||||
bootstrap-switch-rails (= 3.3.3)
|
bootstrap-switch-rails (= 3.3.3)
|
||||||
capybara (= 3.39.2)
|
capybara (= 3.39.2)
|
||||||
carrierwave (= 2.2.4)
|
carrierwave (= 3.0.7)
|
||||||
chrome_remote (= 0.3.0)
|
chrome_remote (= 0.3.0)
|
||||||
configurate (= 0.6.0)
|
configurate (= 0.6.0)
|
||||||
cucumber-api-steps (= 0.14)
|
cucumber-api-steps (= 0.14)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ class SecureUploader < CarrierWave::Uploader::Base
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def extension
|
def extension
|
||||||
".#{original_filename.split('.').drop(1).join('.')}" if original_filename.present?
|
".#{file.filename.split('.').drop(1).join('.')}" if file.present? && file.respond_to?(:filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
def secure_token(bytes=16)
|
def secure_token(bytes=16)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue