SetContentDisposition sets the Content-Disposition header, passthrough to ContentDispositionValue
(originURL, filename, ext, contentType string, returnAttachment bool)
| 79 | |
| 80 | // SetContentDisposition sets the Content-Disposition header, passthrough to ContentDispositionValue |
| 81 | func (w *Writer) SetContentDisposition(originURL, filename, ext, contentType string, returnAttachment bool) { |
| 82 | value := httpheaders.ContentDispositionValue( |
| 83 | originURL, |
| 84 | filename, |
| 85 | ext, |
| 86 | contentType, |
| 87 | returnAttachment, |
| 88 | ) |
| 89 | |
| 90 | if value != "" { |
| 91 | w.result.Set(httpheaders.ContentDisposition, value) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // Passthrough copies specified headers from the original response headers to the response headers. |
| 96 | func (w *Writer) Passthrough(only ...string) { |
no test coverage detected