I'm trying to get a file from S3 with Javascript but I'm getting a very strange code, check the image after code
AWS.config.update({
'accessKeyId': 'XXX',
'secretAccessKey': 'XXX',
'region': 'us-east-1'
});
var s3 = new AWS.S3();
var s3Params = { Bucket: "mybucket", Key: "path/photo-515169.jpeg"}
const url = s3.getSignedUrl('getObject', s3Params)
$.ajax({
url: url,
success: function(url){
console.log(url)
}
})
Here's the console.log: