title: How to generate viewable s3 url nodejs
body: <p>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.</p>
  
  <p>I am using aws-sdk package and generate s3 as below</p>
  
  <pre><code>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);
          });
  </code></pre>
  
  <p>Does anyone know how to generate a url where i can show the file.</p>