diff --git a/backend/app/utils.py b/backend/app/utils.py index 5ea9a47..032ab98 100644 --- a/backend/app/utils.py +++ b/backend/app/utils.py @@ -194,8 +194,7 @@ def validate_file_size_type(file: IO): # return f'{static}/{folderName}/{picture_name}' - -async def upload_file(file_name, bucket_name, object_name=None): +def upload_file(file_name, bucket_name, object_name=None): ConnectionUrl = f"https://{settings.AccountID}.r2.cloudflarestorage.com/images" r2 = boto3.client( "s3", @@ -215,9 +214,6 @@ async def upload_file(file_name, bucket_name, object_name=None): return True async def save_picture(file, folder_name: str = "", file_name: str = None): - import io - - randon_uid = str(uuid4()) _, f_ext = os.path.splitext(file.filename)