pdfhyperlink

click pdf link in web, how to preview instead of download?


I have my resume linked in my home page.

But I found when I host the pdf file on two different storage server, the default behavior when click on the link differs: one directly download the pdf file bug the other preview in a new tab.

the two links are as below:

http://data-10045577.file.myqcloud.com/doc/Zhao.Kai_ShanghaiUniv.pdf

http://7xocv2.dl1.z0.glb.clouddn.com/doc/Zhao.Kai_ShanghaiUniv.pdf

I have tested on firefox chrome IE that this is not a browser issue.

For some price issue I have to switch to the storage server of which the default behavior is downloading pdf file.

what settings should I have so that click the pdf link then preview instead of downlod?

Additionally, the storage server provide a configure option that can set the "http header", I know little about the web, so can setting a header work, if so, how to ?


I googled it and it seems the content-disposition argument in http header account for this. But I add content-disposition='inline', doesn't help.


Solution

  • if not the browser's issue, then the download one is added programmatically with headers, and the preview one is just putting your file in that folder on the server