aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/lib')
-rw-r--r--activestorage/lib/active_storage/downloader.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activestorage/lib/active_storage/downloader.rb b/activestorage/lib/active_storage/downloader.rb
index 2aa56a729a..87be6efb05 100644
--- a/activestorage/lib/active_storage/downloader.rb
+++ b/activestorage/lib/active_storage/downloader.rb
@@ -19,7 +19,7 @@ module ActiveStorage
attr_reader :blob, :tempdir
def open_tempfile
- file = Tempfile.open([ "ActiveStorage", tempfile_extension_with_delimiter ], tempdir)
+ file = Tempfile.open([ "ActiveStorage-#{blob.id}-", blob.filename.extension_with_delimiter ], tempdir)
begin
yield file
@@ -40,9 +40,5 @@ module ActiveStorage
raise ActiveStorage::IntegrityError
end
end
-
- def tempfile_extension_with_delimiter
- blob.filename.extension_with_delimiter
- end
end
end