Need to create file, too
This commit is contained in:
parent
1e3012bf7f
commit
e71fdd6977
|
@ -117,7 +117,7 @@ def analyze_image(request: Request, image: UploadFile):
|
|||
infile = open(incoming_dir / image.filename)
|
||||
file_hash = hashlib.sha256()
|
||||
file_hash.update(image)
|
||||
with open(infile, "wb") as f:
|
||||
with open(infile, "wxb") as f:
|
||||
chunk = image.read(buffer_size)
|
||||
while chunk:
|
||||
print ("writing " + buffer_size + " bytes")
|
||||
|
|
Loading…
Reference in New Issue