B4J Question B4J Webapp :How to Prevent Reader From Opening PDFs in explorers

markcasio

Member
Licensed User
Longtime User
Hi,

Is there a way to configure jserver to download my pdf file instead of showing a preview ?
I used content-disposition without result.
<meta name="content-disposition" content="inline;filename=testfile.pdf">
 

markcasio

Member
Licensed User
Longtime User
added hanlde using resp.SetHeader("Content-disposition", $"attachment; filename=${myfileName}"$)
Still no result , but I'm getting close.
 
Upvote 0

markcasio

Member
Licensed User
Longtime User
I understand monster67 , inline is opening the file and attachment is downloading it. But without setting the contenttype my file won't download.
 
Upvote 0
Top