Skip to content

Commit

Permalink
application/force-download isn't a standard MIME type. Avoid contin…
Browse files Browse the repository at this point in the history
…uing this kinda hack not supported by all browsers
  • Loading branch information
pH-7 authored Apr 26, 2024
1 parent d5e5112 commit 0ca99dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _protected/framework/File/File.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,9 @@ public function download($sFile, $sName, $sMimeType = null)
/* Figure out the MIME type (if not specified) */
if (empty($sMimeType)) {
$sFileExtension = $this->getFileExt($sFile);

$mGetMimeType = $this->getMimeType($sFileExtension);

$sMimeType = 'application/force-download';
$sMimeType = 'application/octet-stream'; // default MIME type
if (!empty($mGetMimeType)) {
$sMimeType = $mGetMimeType;
}
Expand Down

0 comments on commit 0ca99dc

Please sign in to comment.