sdfsdf
This commit is contained in:
parent
6203287b52
commit
2a4fbf363e
|
@ -219,8 +219,8 @@ def delete_file(file_name, bucket_name, object_name=None):
|
||||||
if object_name is None:
|
if object_name is None:
|
||||||
object_name = file_name
|
object_name = file_name
|
||||||
try:
|
try:
|
||||||
#r2.delete_object(bucket_name, file_name)
|
r2.delete_object(Bucket=bucket_name, Key=file_name)
|
||||||
r2.Object(bucket_name, file_name).delete()
|
|
||||||
except ClientError as e:
|
except ClientError as e:
|
||||||
print(f"An error occurred: {e}")
|
print(f"An error occurred: {e}")
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue