Need to do it for both reads

This commit is contained in:
niten 2023-01-10 12:06:11 -08:00
parent 61c06c94b2
commit 70f3283d80
1 changed files with 1 additions and 1 deletions

View File

@ -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")