So I found this piece of code in
root/mydownloads.php and I'm sure that it's what I need but not so sure what to change here. Any tips?
// in case there's a download url
// show a page with the links
if ($dl['url'] != "")
{
$parser_options = array(
'allow_mycode' => 1,
'allow_smilies' => 0,
'allow_imgcode' => 0,
'allow_html' => 0,
'filter_badwords' => 0
);
mydownloads_error($lang->sprintf($lang->mydownloads_url_download, $parser->parse_message("[code]".$dl['url']."
", $parser_options)), $lang->mydownloads_url_download_title, $lang->mydownloads_url_download_title, $dl['did'], $dl['cid'], $dl['name']);
}
// output download
$ext = get_extension($dl['download']);
switch($dl['filetype'])
{
case "application/pdf":
case "image/bmp":
case "image/gif":
case "image/jpeg":
case "image/pjpeg":
case "image/png":
case "text/plain":
/*header("Content-type: {$dl['filetype']}");
$disposition = "inline";*/
//header("Content-type: application/force-download"); // commented because this breaks on devices that can't save to disk
header("Content-type: {$dl['filetype']}");
$disposition = "attachment";
break;
default:
header("Content-type: application/force-download");
$disposition = "attachment";
}