About
An attachment is a response that will trigger the browser to:
- download the response file
- or open it if the operating system application is configured to open this type of file automatically.
How to create an attachment response?
You give the attachment directive via:
- the content-disposition header.
- and the content-type header
Example:
Content-Disposition: attachment; filename.jpg
Content-Type: image/jpeg