Skip to content

Commit 0f44fbc

Browse files
committed
fix: update supported file formats to include MP3 in the workflow editor
1 parent 6a5ffcd commit 0f44fbc

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# ComfyUI embedded workflow editor
22

3-
In-place embedded workflow-exif editing experience for ComfyUI generated images. Edit png exif just in your browser.
3+
In-place embedded workflow-exif editing experience for ComfyUI generated media files. Edit workflow data embedded in PNG, WEBP, FLAC, MP3, and MP4 files directly in your browser.
44

55
![screenshot](docs/screenshot.png)
66

77
## Usage
88

99
1. Open https://comfyui-embeded-workflow-editor.vercel.app/
1010
2. Upload your img (or mount your local directory)
11+
- Supported formats: PNG, WEBP, FLAC, MP3, MP4
1112
- You can also directly load a file via URL parameter: `?url=https://example.com/image.png`
1213
- Or paste a URL into the URL input field
1314
3. Edit as you want

app/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function Home() {
6868
if (!files.length) return toast.error("No files provided.");
6969
const readedWorkflowInfos = await sflow(files)
7070
.filter((e) => {
71-
if (e.name.match(/\.(png|flac|webp|mp4)$/i)) return true;
71+
if (e.name.match(/\.(png|flac|webp|mp4|mp3)$/i)) return true;
7272
toast.error("Not Supported format discarded: " + e.name);
7373
return null;
7474
})
@@ -183,15 +183,15 @@ export default function Home() {
183183
<input
184184
readOnly
185185
className="input input-bordered border-dashed input-sm w-full text-center"
186-
placeholder="Way-1. Paste/Drop files here (png, webp, flac, mp4)"
186+
placeholder="Way-1. Paste/Drop files here (png, webp, flac, mp3, mp4)"
187187
onPaste={async (e) => await gotFiles(e.clipboardData.files)}
188188
/>
189189
<div className="flex w-full gap-2">
190190
<input
191191
value={urlInput}
192192
onChange={(e) => setUrlInput(e.target.value)}
193193
className="input input-bordered input-sm flex-1"
194-
placeholder="Way-4. Paste URL here (png, webp, flac, mp4)"
194+
placeholder="Way-4. Paste URL here (png, webp, flac, mp3, mp4)"
195195
onKeyDown={(e) => {
196196
if (e.key === "Enter" && urlInput) {
197197
(
@@ -232,7 +232,7 @@ export default function Home() {
232232
description: "Supported Files",
233233
accept: {
234234
"image/*": [".png", ".webp"],
235-
"audio/*": [".flac"],
235+
"audio/*": [".flac", ".mp3"],
236236
"video/*": [".mp4"],
237237
},
238238
},
@@ -413,6 +413,7 @@ export default function Home() {
413413
webp: "img",
414414
mp4: "mp4",
415415
flac: "flac",
416+
mp3: "audio",
416417
};
417418
let typeKey = extTypeMap[ext];
418419
if (!typeKey) {
@@ -534,7 +535,7 @@ export default function Home() {
534535
const aIter = workingDir.values() as AsyncIterable<FileSystemFileHandle>;
535536
const readed = await sf(aIter)
536537
.filter((e) => e.kind === "file")
537-
.filter((e) => e.name.match(/\.(png|flac|webp|mp4)$/i))
538+
.filter((e) => e.name.match(/\.(png|flac|webp|mp4|mp3)$/i))
538539
.map(async (e) => await e.getFile())
539540
.map(async (e) => await readWorkflowInfo(e))
540541
.filter((e) => e.workflowJson)

0 commit comments

Comments
 (0)