I use the below code to get the signed url. I am getting a signed url and once i open the url its downloading the file. But i want a url where i can show the file. Like opening file in a new tab.
I am using aws-sdk package and generate s3 as below
const s3 = new AWS.S3();
s3.getSignedUrl('getObject', {
Expires: options.expires || 300,
Bucket: config.awsBucket,
Key: key,
// ACL: 'public-read',
ResponseContentDisposition :'inline;filename=report.pdf'},
function(err, url) {
if (err) {
return deferred.reject(err);
}
return deferred.resolve(url);
});
Does anyone know how to generate a url where i can show the file.