From 243f75280010cccb806fa1c15282547e8e3aec28 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 29 May 2025 17:44:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=AD=E9=9F=B3=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/blueprints/contacts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/dashboard/blueprints/contacts.py b/admin/dashboard/blueprints/contacts.py index 27dec1b..4b93c15 100644 --- a/admin/dashboard/blueprints/contacts.py +++ b/admin/dashboard/blueprints/contacts.py @@ -266,9 +266,9 @@ def api_send_message(): if 'file' not in request.files: return jsonify({'success': False, 'message': '未上传文件'}) file = request.files['file'] - if file.name.endswith('.mp3'): + if file.filename.endswith('.mp3'): format_str = "mp3" - elif file.name.endswith('.wav'): + elif file.filename.endswith('.wav'): format_str = "wav" else: return jsonify({