Fix bug where old image was not saved on AWS
This commit is contained in:
@@ -238,12 +238,9 @@ class ImageEndpoint:
|
||||
|
||||
MongoDBService.updateSingle(identifier, decoded_image, metadata)
|
||||
|
||||
# TODO TOBIAS get old image for MinIO
|
||||
old_bytes = None
|
||||
|
||||
for service in ImageEndpoint.storageServiceList:
|
||||
orig_new_name = identifier + '_' + str(metadata['version']) + '.jpg'
|
||||
if not service.move_file(identifier, orig_new_name, old_bytes):
|
||||
if not service.move_file(identifier, orig_new_name):
|
||||
print("Could not move file from {} to {}".format(identifier, orig_new_name))
|
||||
if not service.create_file(filename, decoded_image):
|
||||
print("Could not save updated image to " + service.name)
|
||||
|
||||
Reference in New Issue
Block a user