forked from rDrama/rDrama
fds
parent
d4fa9a3dcd
commit
b881d98d1a
|
@ -601,12 +601,7 @@ def thumbnail_thread(pid):
|
||||||
return False, f'Unknown content type {x.headers.get("Content-Type")} for submitted content'
|
return False, f'Unknown content type {x.headers.get("Content-Type")} for submitted content'
|
||||||
|
|
||||||
|
|
||||||
print(f"Have image, uploading")
|
with open("image.webp", "wb") as file:
|
||||||
|
|
||||||
name = f"posts/{post.base36id}/thumb.png"
|
|
||||||
tempname = name.replace("/", "_")
|
|
||||||
|
|
||||||
with open(tempname, "wb") as file:
|
|
||||||
for chunk in image_req.iter_content(1024):
|
for chunk in image_req.iter_content(1024):
|
||||||
file.write(chunk)
|
file.write(chunk)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue