From 9926cd24daf08ddec9af3337d1cfc3c63d18ae84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=B0=BD=ED=98=84?= Date: Sat, 3 Oct 2026 08:08:27 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B1=EC=97=94=EB=93=9C=EC=97=90=EC=84=9C?= =?UTF-8?q?=20MusicXML=20=ED=91=9C=EC=A4=80=20=ED=99=95=EC=9E=A5=EC=9E=90?= =?UTF-8?q?=EB=A5=BC=20=ED=97=88=EC=9A=A9=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MusicXML 변환 API가 .musicxml 파일도 .xml 및 .mxl과 같은 방식으로 처리하도록 확장자 검사와 설명을 맞췄다. --- backend/routers/transcribe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/routers/transcribe.py b/backend/routers/transcribe.py index 117da18..0beaa06 100644 --- a/backend/routers/transcribe.py +++ b/backend/routers/transcribe.py @@ -20,7 +20,7 @@ MAX_UPLOAD_BYTES = 50 * 1024 * 1024 # 50 MB # H4 - extension allowlists _MIDI_EXTS = {".mid", ".midi"} -_XML_EXTS = {".xml", ".mxl"} +_XML_EXTS = {".xml", ".musicxml", ".mxl"} _AUDIO_EXTS = {".mp3", ".wav", ".ogg", ".flac", ".m4a", ".aac"} # M5 - MIDI magic bytes: "MThd" @@ -102,7 +102,7 @@ async def midi_to_musicxml(file: UploadFile, title: str = Query(default="")): @router.post("/musicxml2midi") async def musicxml_to_midi(file: UploadFile, background_tasks: BackgroundTasks): - """Convert a MusicXML (.xml or .mxl) file to MIDI for playback.""" + """Convert a MusicXML (.xml, .musicxml, or .mxl) file to MIDI for playback.""" try: filename = file.filename or "score.xml" _check_ext(filename, _XML_EXTS)