From 7aaf2b44ec698fd4f20b927fcac7edc0394a2647 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 30 Jun 2020 23:58:02 +0200 Subject: Fix remote files not using Content-Type header, streaming (#14184) --- config/application.rb | 2 ++ config/initializers/paperclip.rb | 1 + 2 files changed, 3 insertions(+) (limited to 'config') diff --git a/config/application.rb b/config/application.rb index 8348649df..a1da9d61f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,10 +9,12 @@ Bundler.require(*Rails.groups) require_relative '../app/lib/exceptions' require_relative '../lib/paperclip/url_generator_extensions' require_relative '../lib/paperclip/attachment_extensions' +require_relative '../lib/paperclip/media_type_spoof_detector_extensions' require_relative '../lib/paperclip/lazy_thumbnail' require_relative '../lib/paperclip/gif_transcoder' require_relative '../lib/paperclip/video_transcoder' require_relative '../lib/paperclip/type_corrector' +require_relative '../lib/paperclip/response_with_limit_adapter' require_relative '../lib/mastodon/snowflake' require_relative '../lib/mastodon/version' require_relative '../lib/devise/two_factor_ldap_authenticatable' diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index ebb009065..b4849370d 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true Paperclip::DataUriAdapter.register +Paperclip::ResponseWithLimitAdapter.register Paperclip.interpolates :filename do |attachment, style| if style == :original -- cgit