From 83089310650fe7b54e829584ca71773c6b9b7602 Mon Sep 17 00:00:00 2001 From: Rohan Bansal Date: Tue, 20 Feb 2024 18:19:24 +0530 Subject: [PATCH] fix: avoid name conflicts during file upload --- cloud_storage/cloud_storage/overrides/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud_storage/cloud_storage/overrides/file.py b/cloud_storage/cloud_storage/overrides/file.py index e37e61e..dad7927 100644 --- a/cloud_storage/cloud_storage/overrides/file.py +++ b/cloud_storage/cloud_storage/overrides/file.py @@ -394,7 +394,7 @@ def upload_file(file: File) -> File: except Exception as e: frappe.log_error("File Upload Error", e) file.db_set("s3_key", path) - if not file.name: + if frappe.flags.cloud_storage and not file.name: file.save() return file