All, I'm trying to take an S3 Bucket object and FormData.Append it, but it keeps telling me that Parameter 2 is not of type 'Blob'.
I can easily go the other way, take data from a callback and post it to S3, just not the outbound path I'm trying to do.
Environment: AWS, Lambda, NodeJS18x. (The NodeJs18 part is kind of the important part here, Compliance wants me to use the most recent LTS version.).
console.info("Preparing to get S3 object.");
let command = new GetObjectCommand(params);
const item = await client.send(command);
console.log(data);
let form = new FormData();
form.append("media", data, { filename: srcKey });
I also have tried it this way:
console.info("Preparing to get S3 object.");
const data = await s3.getObject(params).promise();
let form = new FormData();
form.append("media", data.Body, { filename: srcKey });
Any ideas what I'm missing?