add: type

This commit is contained in:
crazywoola 2024-11-25 22:32:59 +08:00
parent c40b5b3d33
commit 5b771e898e

View File

@ -121,6 +121,10 @@ export function checkIsAnimatedImage(file: Blob) {
const fileReader = new FileReader()
fileReader.onload = function (e) {
if (!e.target || !(e.target.result instanceof ArrayBuffer)) {
reject(new Error('File reading error'))
return
}
const arr = new Uint8Array(e.target.result)
// Check file extension