diff --git a/app/support/media-files/detect.ts b/app/support/media-files/detect.ts index e7a77dea..fd652153 100644 --- a/app/support/media-files/detect.ts +++ b/app/support/media-files/detect.ts @@ -122,9 +122,9 @@ async function hasImageSignature(file: string): Promise { const fh = await open(file, 'r'); try { - const fileHead = new Uint8Array(16); - await fh.read(fileHead); - return checkImageSignature(fileHead); + const buffer = new Uint8Array(16); + await fh.read({ buffer }); + return checkImageSignature(buffer); } finally { await fh.close(); }