Let an image or a video past the editor uploader mime gate again
This commit is contained in:
parent
ad630df98f
commit
13c538b901
1 changed files with 4 additions and 1 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue