diff --git a/app/controllers/active_storage/base_controller.rb b/app/controllers/active_storage/base_controller.rb
index afb2fc3768987dfd551b1e5d153b4ab0d7a874e8..bf0f18f73eebfa4836e16a0eaff7e65f6e62ea90 100644
--- a/app/controllers/active_storage/base_controller.rb
+++ b/app/controllers/active_storage/base_controller.rb
@@ -9,4 +9,13 @@ class ActiveStorage::BaseController < ActionController::Base
   protect_from_forgery with: :exception
 
   self.etag_with_template_digest = false
+
+  private
+    def stream(blob)
+      blob.download do |chunk|
+        response.stream.write chunk
+      end
+    ensure
+      response.stream.close
+    end
 end