Browse Source

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

Fixes #14817
master
ThibG 3 years ago
committed by GitHub
parent
commit
5bbc9a4f78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/paperclip/response_with_limit_adapter.rb

+ 1
- 1
lib/paperclip/response_with_limit_adapter.rb View File

@ -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…
Cancel
Save