mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 05:12:18 +00:00
Fix downloading remote media files when server returns empty filename (#14867)
Fixes #14817
This commit is contained in:
parent
d60290044e
commit
5bbc9a4f78
|
@ -16,7 +16,7 @@ module Paperclip
|
|||
private
|
||||
|
||||
def cache_current_values
|
||||
@original_filename = filename_from_content_disposition || filename_from_path || 'data'
|
||||
@original_filename = filename_from_content_disposition.presence || filename_from_path.presence || 'data'
|
||||
@size = @target.response.content_length
|
||||
@tempfile = copy_to_tempfile(@target)
|
||||
@content_type = ContentTypeDetector.new(@tempfile.path).detect
|
||||
|
|
Loading…
Reference in a new issue