Force S3 PDF to be viewed in browser instead of download

前端 未结 4 1107
说谎
说谎 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 00:50

    You also need to set the Content-Type correctly. The browser will check the content-type value, and if it isn't something it knows how to display it will always just download the file.

提交回复
热议问题