BunnyCDN doesn't return content-type (#251)

pull/252/head
Michael Manfre 2022-12-24 00:17:43 -05:00 zatwierdzone przez GitHub
rodzic aca77314d1
commit d88db5efbf
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -63,6 +63,8 @@ async def get_remote_file(
pass
if allow_download:
file = ContentFile(await stream.aread(), name=url)
return file, stream.headers["content-type"]
return file, stream.headers.get(
"content-type", "application/octet-stream"
)
return None, None