More Info

In the video I showed the easiest way to achieve the force download of files but here are some other ways.

Content-Disposition

Here I leave the Content-Type as is and select Content-Disposition form the drop down it’s value is set to attachment by default and this will cause the file to download.

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

 
Content-Disposition-filename

In this example I am adding a semicolon and filename=”thenewtest.pdf”, this will download the test.pdf as thenewtest.pdf.

Content-Type: application/pdf
Content-Disposition: attachment; filename="thenewtest.pdf"
Please follow and like us: