diff options
author | George Claghorn <george@basecamp.com> | 2017-12-15 10:45:00 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2017-12-15 10:45:00 -0500 |
commit | 311af752cfd98b534a3d5dbf30e4a202693f32dc (patch) | |
tree | 16a88bee1a4ea197bc61bdcb449acd28f1b82b3e /activestorage/lib/active_storage | |
parent | 3ddb811acc75292776c39f5a95840b21b32d9fd8 (diff) | |
download | rails-311af752cfd98b534a3d5dbf30e4a202693f32dc.tar.gz rails-311af752cfd98b534a3d5dbf30e4a202693f32dc.tar.bz2 rails-311af752cfd98b534a3d5dbf30e4a202693f32dc.zip |
Restrict variants to variable image blobs
Diffstat (limited to 'activestorage/lib/active_storage')
-rw-r--r-- | activestorage/lib/active_storage/engine.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activestorage/lib/active_storage/engine.rb b/activestorage/lib/active_storage/engine.rb index b870e6d4d6..b41d8bb4d7 100644 --- a/activestorage/lib/active_storage/engine.rb +++ b/activestorage/lib/active_storage/engine.rb @@ -16,6 +16,7 @@ module ActiveStorage config.active_storage = ActiveSupport::OrderedOptions.new config.active_storage.previewers = [ ActiveStorage::Previewer::PDFPreviewer, ActiveStorage::Previewer::VideoPreviewer ] config.active_storage.analyzers = [ ActiveStorage::Analyzer::ImageAnalyzer, ActiveStorage::Analyzer::VideoAnalyzer ] + config.active_storage.variable_content_types = [ "image/png", "image/gif", "image/jpg", "image/jpeg", "image/vnd.adobe.photoshop" ] config.active_storage.paths = ActiveSupport::OrderedOptions.new config.eager_load_namespaces << ActiveStorage @@ -26,6 +27,7 @@ module ActiveStorage ActiveStorage.queue = app.config.active_storage.queue ActiveStorage.previewers = app.config.active_storage.previewers || [] ActiveStorage.analyzers = app.config.active_storage.analyzers || [] + ActiveStorage.variable_content_types = app.config.active_storage.variable_content_types || [] end end |