# HG changeset patch # User Brian Neal # Date 1683505415 18000 # Node ID ba23e79438f4b3a82ba0df954b01a2dcf8d99f37 # Parent e3a7e876aca758bd91d494780b7d5bb8043dde08 Another attempt to write BytesIO to a file. diff -r e3a7e876aca7 -r ba23e79438f4 core/images/upload.py --- a/core/images/upload.py Sun May 07 19:16:03 2023 -0500 +++ b/core/images/upload.py Sun May 07 19:23:35 2023 -0500 @@ -163,7 +163,8 @@ if thumb: thumb.seek(0) - shutil.copyfileobj(thumb, thumb_path) + with open(thumb_path, 'wb') as out: + out.write(thumb.getvalue()) os.chmod(thumb_path, perms) # Generate URLs for the image and thumb.