In conventional HTTP response, Content-Disposition
header indicating the contents of the reply to show in what form, is inline form (that is part of a web page or a page), or in the attachment downloaded and saved to a local form.
As the body of the message header
In HTTP scenario, or the first argument is inline
(the default value that represents the reply message to show experience in the form of a portion of or the entire page of the page), or attachment
(means that the message body should be downloaded to the local; most browsers will show a "save as" dialog box, filename
the value of the pre-filled name for the file after downloading, if it exists).
Disposition-the Content: inline
the Content-Disposition: Attachment
the Content-Disposition: Attachment; filename = "filename.jpg"
production environment can be arranged directly nginx:
LOCATION ~ ^ / S / {$ (*.)
The add_header the Content-Disposition "Attachment ; filename = $ 1 "; // download does not open
add_header Content-Disposition" inline; filename = $ 1 "; // download file is opened
}