We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa5116d commit 2635e13Copy full SHA for 2635e13
1 file changed
src/index.js
@@ -12,12 +12,12 @@ const handler = async (event) => {
12
// Parse the incoming multipart form-data
13
const fileBuffer = await parseMultipart(event);
14
15
- // Validate JPEG buffer
16
- if (fileBuffer[0] !== 0xff || fileBuffer[1] !== 0xd8) {
17
- throw new Error(
18
- `Invalid JPEG file. SOI marker not found. ${fileBuffer[0]}`
19
- );
20
- }
+ // // Validate JPEG buffer
+ // if (fileBuffer[0] !== 0xff || fileBuffer[1] !== 0xd8) {
+ // throw new Error(
+ // `Invalid JPEG file. SOI marker not found. ${fileBuffer[0]}`
+ // );
+ // }
21
22
// Decode the JPEG to get raw pixel data
23
const decodedImage = jpeg.decode(fileBuffer, { useTArray: true });
0 commit comments