This commit is contained in:
Philip Cheung 2024-10-08 10:27:42 +08:00
parent 47ac48e563
commit db607c9cb5
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ def delete_file(file_name, bucket_name, object_name=None):
if object_name is None:
object_name = file_name
try:
r2.delete_object(Bucket=bucket_name, Key=object_name)
r2.delete_object(bucket_name, file_name)
except ClientError as e:
print(f"An error occurred: {e}")
return False