download_strategy: only take basename of Content-Disposition
This commit is contained in:
parent
a466e6152a
commit
388a66383b
@ -458,7 +458,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
filename = URI.decode_www_form_component(encoded_filename).encode(encoding) if encoding && encoded_filename
|
filename = URI.decode_www_form_component(encoded_filename).encode(encoding) if encoding && encoded_filename
|
||||||
end
|
end
|
||||||
|
|
||||||
filename || content_disposition.filename
|
(filename || content_disposition.filename).rpartition("/")[-1]
|
||||||
end
|
end
|
||||||
|
|
||||||
filenames = lines.map(&parse_content_disposition).compact
|
filenames = lines.map(&parse_content_disposition).compact
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user