Let an image or a video past the editor uploader mime gate again

This commit is contained in:
Coracle-Bot 2026-09-10 01:26:01 +00:00
parent ad630df98f
commit 13c538b901

View file

@ -187,7 +187,10 @@ export const makeEditor = async ({
}, },
fileUpload: { fileUpload: {
config: { 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) => upload: async (attrs: FileAttributes) =>
uploadFile(await compressFileForUpload(attrs.file), {url, encrypt: encryptFiles}), uploadFile(await compressFileForUpload(attrs.file), {url, encrypt: encryptFiles}),
onDrop: () => uploading?.set(true), onDrop: () => uploading?.set(true),