diff --git a/Gemfile b/Gemfile index a708d732d..0f61bed53 100644 --- a/Gemfile +++ b/Gemfile @@ -83,7 +83,7 @@ gem "activerecord-import", "1.7.0" # File uploading -gem "carrierwave", "2.2.4" +gem "carrierwave", "3.0.7" gem "fog-aws", "3.19.0" gem "mini_magick", "4.12.0" diff --git a/Gemfile.lock b/Gemfile.lock index 7c79003eb..b152a0d4f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,13 +107,12 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (2.2.4) - activemodel (>= 5.0.0) - activesupport (>= 5.0.0) + carrierwave (3.0.7) + activemodel (>= 6.0.0) + activesupport (>= 6.0.0) addressable (~> 2.6) image_processing (~> 1.1) marcel (~> 1.0.0) - mini_mime (>= 0.1.3) ssrf_filter (~> 1.0) celluloid (0.17.4) celluloid-essentials @@ -266,7 +265,7 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (>= 0.6, < 0.8) - ffi (1.15.5) + ffi (1.17.0) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake @@ -643,7 +642,7 @@ GEM rubocop (>= 1.33.0, < 2.0) ruby-oembed (0.16.1) ruby-progressbar (1.13.0) - ruby-vips (2.1.4) + ruby-vips (2.2.1) ffi (~> 1.12) ruby2_keywords (0.0.5) rubyzip (2.3.2) @@ -698,7 +697,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - ssrf_filter (1.1.1) + ssrf_filter (1.1.2) state_machines (0.5.0) string-direction (1.2.2) swd (2.0.2) @@ -797,7 +796,7 @@ DEPENDENCIES bootstrap-sass (= 3.4.1) bootstrap-switch-rails (= 3.3.3) capybara (= 3.39.2) - carrierwave (= 2.2.4) + carrierwave (= 3.0.7) chrome_remote (= 0.3.0) configurate (= 0.6.0) cucumber-api-steps (= 0.14) diff --git a/app/uploaders/secure_uploader.rb b/app/uploaders/secure_uploader.rb index 486c70e0a..18afbc7bc 100644 --- a/app/uploaders/secure_uploader.rb +++ b/app/uploaders/secure_uploader.rb @@ -4,7 +4,7 @@ class SecureUploader < CarrierWave::Uploader::Base protected 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 def secure_token(bytes=16)