File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/*
3
- * jQuery File Upload Plugin PHP Class 6.7
3
+ * jQuery File Upload Plugin PHP Class 6.7.1
4
4
* https://github.com/blueimp/jQuery-File-Upload
5
5
*
6
6
* Copyright 2010, Sebastian Tschan
@@ -832,14 +832,12 @@ protected function download() {
832
832
);
833
833
}
834
834
$ file_path = $ this ->get_upload_path ($ file_name , $ this ->get_version_param ());
835
+ // Prevent browsers from MIME-sniffing the content-type:
836
+ $ this ->header ('X-Content-Type-Options: nosniff ' );
835
837
if (!preg_match ($ this ->options ['inline_file_types ' ], $ file_name )) {
836
- $ this ->header ('Content-Description: File Transfer ' );
837
838
$ this ->header ('Content-Type: application/octet-stream ' );
838
839
$ this ->header ('Content-Disposition: attachment; filename=" ' .$ file_name .'" ' );
839
- $ this ->header ('Content-Transfer-Encoding: binary ' );
840
840
} else {
841
- // Prevent Internet Explorer from MIME-sniffing the content-type:
842
- $ this ->header ('X-Content-Type-Options: nosniff ' );
843
841
$ this ->header ('Content-Type: ' .$ this ->get_file_type ($ file_path ));
844
842
$ this ->header ('Content-Disposition: inline; filename=" ' .$ file_name .'" ' );
845
843
}
You can’t perform that action at this time.
0 commit comments