From 13c538b9014e42921e3ba4b77d02bfdfd4a23289 Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Thu, 10 Sep 2026 01:26:01 +0000 Subject: [PATCH] Let an image or a video past the editor uploader mime gate again --- src/app/editor/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/editor/index.ts b/src/app/editor/index.ts index 414f2538..7f2596bf 100644 --- a/src/app/editor/index.ts +++ b/src/app/editor/index.ts @@ -187,7 +187,10 @@ export const makeEditor = async ({ }, fileUpload: { config: { - allowedMimeTypes: ["*/*"], + // nostr-editor reads this twice: as the file picker's `accept`, where the + // wildcard is what we want, and as an exact match against the file's own type, + // which no wildcard satisfies. addFile below is the gate that decides. + allowedMimeTypes: Object.assign(["*/*"], {includes: () => true}), upload: async (attrs: FileAttributes) => uploadFile(await compressFileForUpload(attrs.file), {url, encrypt: encryptFiles}), onDrop: () => uploading?.set(true),