Fix sending remote files with URLs containing GET parameters or hashtags (#423)

This commit is contained in:
Kacper Ziubryniewicz
2019-04-25 22:50:32 +02:00
committed by Mads Marquart
parent f945fa80b3
commit f834c01921

View File

@@ -288,7 +288,7 @@ def get_files_from_urls(file_urls):
# https://stackoverflow.com/a/37060758
files.append(
(
basename(file_url),
basename(file_url).split("?")[0].split("#")[0],
r.content,
r.headers.get("Content-Type") or guess_type(file_url)[0],
)