fix: 512 size limit (#20)

This commit is contained in:
nullptr 2024-11-14 11:34:40 +00:00 committed by GitHub
parent 3f0595ccb2
commit b1faad1c8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 38 deletions

View File

@ -44,26 +44,9 @@
// get the blob
canvas.toBlob(
async (blob) => {
// resolve({
// file: f,
// from,
// to,
// blobUrl:
// blob === null
// ? ""
// : URL.createObjectURL(blob),
// id: Math.random().toString(36).substring(2),
// buffer: await f.arrayBuffer(),
// extension: from,
// name: f.name,
// result: null,
// progress: 0,
// });
resolve(
new VertFile(
new File([blob!], f.name, {
type: blob!.type,
}),
f,
to,
URL.createObjectURL(blob!),
),
@ -75,26 +58,7 @@
};
img.onerror = async () => {
// resolve({
// file: f,
// from,
// to,
// blobUrl: "",
// id: Math.random().toString(36).substring(2),
// name: f.name,
// buffer: await f.arrayBuffer(),
// extension: from,
// result: null,
// progress: 0,
// });
resolve(
new VertFile(
new File([await f.arrayBuffer()], f.name, {
type: f.type,
}),
to,
),
);
resolve(new VertFile(f, to));
};
},
);