Force S3 PDF to be viewed in browser instead of download

前端 未结 4 1108
说谎
说谎 2021-02-09 00:24

So you can force a download by using Content-Disposition: attachment

Content-Disposition: inline is the default and should display in the brows

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-09 01:12

    You need to provide both these meta data inorder to view the file instead of download:

    Content-Disposition: attachment
    Content-Type: application/pdf
    

提交回复
热议问题