SetContentDisposition(type, filename) Last updated: 28. Jun 2023

API only function

Tells the browser to download and save the returned result to a file with the specified name.

Parameters

Name Type Description
type string Attachment
filename string Sets the content disposition header and tells the browser to download and save the returned result.
If this header is set

Returns

null

Example

Code example (JS)

JS is normal JavaScript either running in the browser or on the Docly™ server.
docly.setContentDisposition("attachment", "Excel-file.xlsx");