Merge pull request #1893 from arc53/fix-attachment-bugs

fix: replace secure_filename with safe_filename for attachment handling
This commit is contained in:
Alex
2025-07-22 16:24:55 +01:00
committed by GitHub

View File

@@ -3557,7 +3557,7 @@ class StoreAttachment(Resource):
try:
attachment_id = ObjectId()
original_filename = secure_filename(os.path.basename(file.filename))
original_filename = safe_filename(os.path.basename(file.filename))
relative_path = f"{settings.UPLOAD_FOLDER}/{user}/attachments/{str(attachment_id)}/{original_filename}"
metadata = storage.save_file(file, relative_path)