Skip to content
Snippets Groups Projects
Unverified Commit 5bbc9a4f authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix downloading remote media files when server returns empty filename (#14867)

Fixes #14817
parent d6029004
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment