Mercurial > prosody-modules
diff mod_http_upload_external/share_v2.php @ 3164:5176b8d81ec7
share_v2.php: Remove content-disposition if mime type is set
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 02 Jul 2018 12:56:19 +0100 |
parents | 31b85864a615 |
children | 3b13f19652e2 |
line wrap: on
line diff
--- a/mod_http_upload_external/share_v2.php Mon Jul 02 12:55:59 2018 +0100 +++ b/mod_http_upload_external/share_v2.php Mon Jul 02 12:56:19 2018 +0100 @@ -128,8 +128,8 @@ $mime_type = file_get_contents($store_file_name.'-type'); if($mime_type === FALSE) { $mime_type = 'application/octet-stream'; + header('Content-Disposition: attachment'); } - header('Content-Disposition: attachment'); header('Content-Type: '.$mime_type); header('Content-Length: '.filesize($store_file_name)); header("Content-Security-Policy: \"default-src 'none'\"");