From 5145f80934c3dd3cfa87caccd943cb016186cbbc Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Sun, 19 Apr 2026 23:21:01 +0700 Subject: [PATCH] Allow overwrite --- scripts/uploader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/uploader.py b/scripts/uploader.py index 0f74600..19b0dd6 100644 --- a/scripts/uploader.py +++ b/scripts/uploader.py @@ -5,7 +5,7 @@ def upload(file, directory, new_name=None): if not new_name: new_name = file.filename full_path = os.path.join(directory, new_name) - file.save(full_path) + file.save(full_path, overwrite=True) return {"status": "success", "path": full_path} except Exception as e: return {"status": "failed", "error": str(e)}