You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that this can be used to initiate downloads of the file.
Something like:
if($_GET['download'] !== null) {
$type = 'application/octet-stream'
} else {
switch ($file[count($file)-1]) {
case 'mp3':
$type = 'audio/mpeg';
break;
// All the other types...
}
}
The idea being that we can simply give the download url parameter and the MIME type will be broken to trigger the browser to download it instead of trying to play it.
The text was updated successfully, but these errors were encountered:
So that this can be used to initiate downloads of the file.
Something like:
The idea being that we can simply give the
download
url parameter and the MIME type will be broken to trigger the browser to download it instead of trying to play it.The text was updated successfully, but these errors were encountered: