lib/active_storage/engine.rb in activestorage-7.0.2.2 vs lib/active_storage/engine.rb in activestorage-7.0.2.3
- old
+ new
@@ -78,10 +78,24 @@
image/vnd.adobe.photoshop
image/vnd.microsoft.icon
application/pdf
)
+ default_unsupported_image_processing_arguments = %w(
+ -debug
+ -display
+ -distribute-cache
+ -help
+ -path
+ -print
+ -set
+ -verbose
+ -version
+ -write
+ -write-mask
+ )
+
config.eager_load_namespaces << ActiveStorage
initializer "active_storage.configs" do
config.after_initialize do |app|
ActiveStorage.logger = app.config.active_storage.logger || Rails.logger
@@ -90,9 +104,12 @@
ActiveStorage.analyzers = app.config.active_storage.analyzers || []
ActiveStorage.paths = app.config.active_storage.paths || {}
ActiveStorage.routes_prefix = app.config.active_storage.routes_prefix || "/rails/active_storage"
ActiveStorage.draw_routes = app.config.active_storage.draw_routes != false
ActiveStorage.resolve_model_to_route = app.config.active_storage.resolve_model_to_route || :rails_storage_redirect
+
+ ActiveStorage.supported_image_processing_methods = app.config.active_storage.supported_image_processing_methods || []
+ ActiveStorage.unsupported_image_processing_arguments = app.config.active_storage.unsupported_image_processing_arguments || default_unsupported_image_processing_arguments
ActiveStorage.variable_content_types = app.config.active_storage.variable_content_types || []
ActiveStorage.web_image_content_types = app.config.active_storage.web_image_content_types || []
ActiveStorage.content_types_to_serve_as_binary = app.config.active_storage.content_types_to_serve_as_binary || []
ActiveStorage.service_urls_expire_in = app.config.active_storage.service_urls_expire_in || 5.minutes