0

I am doing a mock content moderation labeling using AWS Rekognition on React, but no matter what available image format (bytes, S3 object) I submitted, Rekognition never recognizes it, giving Unhandled Rejection (InvalidParameterException): Requested image should either contain bytes or s3 object.

I have followed Rekognition's guideline here, StackOverflow solutions: 1. Converting into Bytes as an Image param here, 2. Using S3 Object here, 3. Using Buffer to read image here, 4. Using raw file input to upload image (this one definitely did not work), 5. Checking if my image is corrupted or not here – in fact I tried with more than 20 images and all failed, 6. Stripping EXIF data here.

Library I use: node-rekognition (I use an old package because my huge node app is still runs on version 12.13.0), React 16 (class component approach)

Feel free to request any additional info if I lack some. Thanks.

Clemi
  • 1
  • Somehow I couldn't post my code here because it would mark my question as spam. Please find the code here: https://drive.google.com/file/d/1k5l9iLfhDf8A3AdY4vIIFsnNBShEekfY/view?usp=sharing – Clemi Nov 28 '22 at 13:04

0 Answers0