From 6203287b52e91b48c6fac6733caba4fd5034103a Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Tue, 8 Oct 2024 10:34:31 +0800 Subject: [PATCH] fsdaf --- backend/app/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/utils.py b/backend/app/utils.py index b28548f..958f7a8 100644 --- a/backend/app/utils.py +++ b/backend/app/utils.py @@ -219,7 +219,8 @@ def delete_file(file_name, bucket_name, object_name=None): if object_name is None: object_name = file_name try: - r2.delete_object(bucket_name, file_name) + #r2.delete_object(bucket_name, file_name) + r2.Object(bucket_name, file_name).delete() except ClientError as e: print(f"An error occurred: {e}") return False