If I Want to get my image from s3 but using the URL as a parameter in the params is that possible. Currently, I am getting my images using the key.
const downloadParams = {
Key: fileKey,
Bucket: BUCKET_NAME
};
const data = await s3.getObject(downloadParams);
const stream = await fs.createReadStream(data);
return await s3.getObject(downloadParams).createReadStream();
}
If you have the full image URL you can use request or a similar library to get the file instead of using s3.getObject