lib/active_storage/engine.rb in activestorage-7.0.8.6 vs lib/active_storage/engine.rb in activestorage-7.1.0.beta1
- old
+ new
@@ -33,13 +33,11 @@
config.active_storage.precompile_assets = true
config.active_storage.variable_content_types = %w(
image/png
image/gif
- image/jpg
image/jpeg
- image/pjpeg
image/tiff
image/bmp
image/vnd.adobe.photoshop
image/vnd.microsoft.icon
image/webp
@@ -49,17 +47,15 @@
)
config.active_storage.web_image_content_types = %w(
image/png
image/jpeg
- image/jpg
image/gif
)
config.active_storage.content_types_to_serve_as_binary = %w(
text/html
- text/javascript
image/svg+xml
application/postscript
application/x-shockwave-flash
text/xml
application/xml
@@ -69,21 +65,24 @@
)
config.active_storage.content_types_allowed_inline = %w(
image/png
image/gif
- image/jpg
image/jpeg
image/tiff
image/bmp
image/vnd.adobe.photoshop
image/vnd.microsoft.icon
application/pdf
)
config.eager_load_namespaces << ActiveStorage
+ initializer "active_storage.deprecator", before: :load_environment_config do |app|
+ app.deprecators[:active_storage] = ActiveStorage.deprecator
+ end
+
initializer "active_storage.configs" do
config.after_initialize do |app|
ActiveStorage.logger = app.config.active_storage.logger || Rails.logger
ActiveStorage.variant_processor = app.config.active_storage.variant_processor || :mini_magick
ActiveStorage.previewers = app.config.active_storage.previewers || []
@@ -115,12 +114,17 @@
ActiveStorage.urls_expire_in = app.config.active_storage.urls_expire_in
ActiveStorage.content_types_allowed_inline = app.config.active_storage.content_types_allowed_inline || []
ActiveStorage.binary_content_type = app.config.active_storage.binary_content_type || "application/octet-stream"
ActiveStorage.video_preview_arguments = app.config.active_storage.video_preview_arguments || "-y -vframes 1 -f image2"
- ActiveStorage.silence_invalid_content_types_warning = app.config.active_storage.silence_invalid_content_types_warning || false
+ unless app.config.active_storage.silence_invalid_content_types_warning.nil?
+ ActiveStorage.silence_invalid_content_types_warning = app.config.active_storage.silence_invalid_content_types_warning
+ end
- ActiveStorage.replace_on_assign_to_many = app.config.active_storage.replace_on_assign_to_many || false
+ unless app.config.active_storage.replace_on_assign_to_many.nil?
+ ActiveStorage.replace_on_assign_to_many = app.config.active_storage.replace_on_assign_to_many
+ end
+
ActiveStorage.track_variants = app.config.active_storage.track_variants || false
end
end
initializer "active_storage.attached" do