I have this
const textract = new AWS.Textract({ region });
const params = {
DocumentLocation: {
S3Object: {
Bucket: bucketName,
Name: s3FilePath
}
}
};
const data = await textract.detectDocumentText(params).promise();
It works fine. However, in another scenario, I do not have this data in S3 url. Instead, I tried
const params = {
Document: {
Bytes: bytes
}
};
const data = await textract.detectDocumentText(params).promise();
I got: UnsupportedDocumentException. It seems mostly I am making wrong API call. Any idea how I can fix error [or] suggestion to use a different API?