From 70f3283d8022b42619838a84366e5894eb047a92 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 10 Jan 2023 12:06:11 -0800 Subject: [PATCH] Need to do it for both reads --- src/objectifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objectifier.py b/src/objectifier.py index 41e883c..b711719 100644 --- a/src/objectifier.py +++ b/src/objectifier.py @@ -122,7 +122,7 @@ def analyze_image(request: Request, image: UploadFile): file_hash.update(chunk) print ("writing " + buffer_size + " bytes") f.write(chunk) - chunk = image.read(buffer_size) + chunk = image.file.read(buffer_size) print("save complete") print("analyzing image") result = detector.detect_objects(infile, file_hash.hexdigest() + ".png")