(fix:attachment) strictly use filename

This commit is contained in:
ManishMadan2882
2025-05-08 00:11:02 +05:30
parent 89d5e7bee5
commit ea6533db4e

View File

@@ -2978,7 +2978,7 @@ class StoreAttachment(Resource):
try:
attachment_id = ObjectId()
original_filename = secure_filename(file.filename)
original_filename = secure_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)