mirror of https://github.com/VERT-sh/VERT.git
fix: 512 size limit
This commit is contained in:
parent
3f0595ccb2
commit
9933bfa081
|
@ -44,26 +44,9 @@
|
||||||
// get the blob
|
// get the blob
|
||||||
canvas.toBlob(
|
canvas.toBlob(
|
||||||
async (blob) => {
|
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(
|
resolve(
|
||||||
new VertFile(
|
new VertFile(
|
||||||
new File([blob!], f.name, {
|
f,
|
||||||
type: blob!.type,
|
|
||||||
}),
|
|
||||||
to,
|
to,
|
||||||
URL.createObjectURL(blob!),
|
URL.createObjectURL(blob!),
|
||||||
),
|
),
|
||||||
|
@ -75,26 +58,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
img.onerror = async () => {
|
img.onerror = async () => {
|
||||||
// resolve({
|
resolve(new VertFile(f, to));
|
||||||
// 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,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue