diff --git a/apps/api/src/http/upload/index.ts b/apps/api/src/http/upload/index.ts index a66bec1..765840c 100644 --- a/apps/api/src/http/upload/index.ts +++ b/apps/api/src/http/upload/index.ts @@ -67,7 +67,7 @@ function readImageDimensions(file: Express.Multer.File): { width: number; height let offset = 2 while (offset + 9 < buffer.length) { if (buffer[offset] !== 0xff) return null - const marker = buffer[offset + 1] + const marker = buffer.readUInt8(offset + 1) const length = buffer.readUInt16BE(offset + 2) if (length < 2) return null if ((marker >= 0xc0 && marker <= 0xc3) || (marker >= 0xc5 && marker <= 0xc7) || (marker >= 0xc9 && marker <= 0xcb) || (marker >= 0xcd && marker <= 0xcf)) {