|
|
@@ -46,7 +46,7 @@ this.SingleFile = (() => {
|
|
|
try {
|
|
|
const buffer = await resourceContent.arrayBuffer();
|
|
|
const dataURI = "data:" + (contentType || "") + ";" + "base64," + base64.fromByteArray(new Uint8Array(buffer));
|
|
|
- if (options.maxSize && buffer.size > options.maxSize * ONE_MB) {
|
|
|
+ if (options.maxSize && buffer.byteLength > options.maxSize * ONE_MB) {
|
|
|
return "data:base64,";
|
|
|
} else {
|
|
|
return dataURI;
|