Prompt user to download PDF file instead of opening

后端 未结 6 2061
庸人自扰
庸人自扰 2021-01-05 07:14

In my project site, if I click on a link, the PDF opens in a new or parent window. Well I want a box to appear that prompts the user to download the file instead of opening

6条回答
  •  北海茫月
    2021-01-05 07:41

    You can't do it via javascript, you need server side implementation.

    Here's the SO Post which should help:
    Allowing user to download from my site through Response.WriteFile()

提交回复
热议问题