Merge branch 'master' into 4-mongodb_api

This commit is contained in:
Tobias Eidelpes 2021-01-19 18:47:57 +01:00
commit ca5b9c30b7
2 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,8 @@ class DropboxService(StorageServiceInterface):
try:
dbx = dropbox.Dropbox(settings.DROPBOX_OAUTH2_ACCESS_TOKEN)
dbx.files_upload(file, settings.DROPBOX_IMAGE_FOLDER + filename)
except:
except Exception as ex:
print(ex)
return False
return True

View File

@ -138,6 +138,8 @@ class ImageEndpoint:
# at this point we know at least one valid image is available
for service in ImageEndpoint.storageServiceList:
if not recovery_has_image[service.name] or not recovery_hash_matches[service.name]:
if recovery_has_image[service.name]:
service.delete_file(metadata['filename'])
if not service.create_file(metadata['filename'], valid_image_bytes):
logger.error('Error duplicating file in service ' + service.name)