From e19d0a09c871ca1430dcb54a6e4bf23bd92051ce Mon Sep 17 00:00:00 2001 From: Dawid Wenderski Date: Mon, 9 Mar 2026 12:48:55 +0100 Subject: [PATCH 1/4] feat: add reference_audio support to txt2music endpoint Switch contentType to multipart and add optional reference audio file upload field for style transfer. Co-Authored-By: Claude Opus 4.6 --- src/lib/endpoint-registry.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/endpoint-registry.ts b/src/lib/endpoint-registry.ts index e13f6c5..8ecffd0 100644 --- a/src/lib/endpoint-registry.ts +++ b/src/lib/endpoint-registry.ts @@ -424,7 +424,7 @@ export const ENDPOINTS: EndpointDefinition[] = [ method: 'POST', path: '/txt2music', description: 'Generate music from text description', - contentType: 'json', + contentType: 'multipart', isAsync: true, hasPriceCalc: true, priceCalcPath: '/txt2music/price-calculation', @@ -539,6 +539,14 @@ export const ENDPOINTS: EndpointDefinition[] = [ { value: 'flac', label: 'FLAC' }, ], }, + { + name: 'reference_audio', + label: 'Reference Audio', + type: 'file', + required: false, + accept: 'audio/*,.mp3,.wav,.flac,.ogg,.m4a', + description: 'Optional reference audio for style transfer (mp3/wav/flac/ogg/m4a, max 10MB)', + }, ], }, From 5881fc24f2267d3efbc831776ca531262858dbf9 Mon Sep 17 00:00:00 2001 From: Dawid Wenderski Date: Mon, 9 Mar 2026 12:49:32 +0100 Subject: [PATCH 2/4] fix: add clear button for non-image file uploads (audio/video) Image files had remove buttons on preview thumbnails, but non-image files (audio, video) had no way to clear the selection after upload. Co-Authored-By: Claude Opus 4.6 --- src/components/form/FileUploadField.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/form/FileUploadField.tsx b/src/components/form/FileUploadField.tsx index 192c7cc..792b801 100644 --- a/src/components/form/FileUploadField.tsx +++ b/src/components/form/FileUploadField.tsx @@ -202,6 +202,17 @@ export function FileUploadField({ /> + {fileCount > 0 && !isImageAccept && ( + + )} + {isImageAccept && (