@secrecy/lib 1.59.4 → 1.59.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -61,9 +61,11 @@ export class SecrecyCloudClient {
|
|
|
61
61
|
filetype = meta;
|
|
62
62
|
}
|
|
63
63
|
else if (!encrypted) {
|
|
64
|
-
filetype = await (data instanceof File
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
// filetype = await (data instanceof File
|
|
65
|
+
// ? fileTypeFromBlob(data)
|
|
66
|
+
// : fileTypeFromBuffer(data))
|
|
67
|
+
const buffer = data instanceof File ? new Uint8Array(await data.arrayBuffer()) : data;
|
|
68
|
+
filetype = await fileTypeFromBuffer(buffer);
|
|
67
69
|
}
|
|
68
70
|
const dataBuffer = data instanceof File ? new Uint8Array(await data.arrayBuffer()) : data;
|
|
69
71
|
if (storageType === 'lite' && dataBuffer.byteLength > kiloToBytes(1024)) {
|
package/package.json
CHANGED