diff --git a/src/objectifier.py b/src/objectifier.py index eadc4b4..02c8eca 100644 --- a/src/objectifier.py +++ b/src/objectifier.py @@ -116,7 +116,7 @@ def analyze_image(request: Request, image: UploadFile): base_url = re.sub(r'\/images\/?$', '/analyzed_images/', str(request.url)) infile = incoming_dir / image.filename file_hash = hashlib.sha256() - with open(infile, "w") as f: + with open(infile, "wb") as f: chunk = image.file.read(buffer_size) while chunk: file_hash.update(chunk)