diff --git a/middleware/app_be/services/minioservice.py b/middleware/app_be/services/minioservice.py index 6643ae0..8491685 100644 --- a/middleware/app_be/services/minioservice.py +++ b/middleware/app_be/services/minioservice.py @@ -55,12 +55,14 @@ class MinioService(StorageServiceInterface): :return True if successful, False otherwise """ identifier = filename.strip('.jpg') - print("Trying to update image with identifier ", identifier) + print("MinioService: Trying to update image with identifier ", identifier) try: headers = {'Content-Type': 'binary/octet-stream'} i = 0 while MinioService.read_file(identifier + '_' + str(i) + '.jpg') is not False: + print("MinioService: Version %s exists".format(identifier + '_' + str(i) + '.jpg')) i = i + 1 + print("MinioService: Creating new version %s".format(identifier + '_' + str(i) + '.jpg')) url = settings.AWS_HOST + identifier + '_' + str(i) + '.jpg' r = requests.put(url, data=file, headers=headers) if r.status_code == 200: