Remote files in Phocadownload
Posted: 23 Jul 2012, 12:38
It occurs that we can't have links to remote files, because Filename is required, and download helper also checks mime type, which is unpredictable, i.e. for this link:
http://www.planetemu.net/index.php?sect ... &id=324727
Can you update PhocaDownload somehow, so Filename is not required, and download helper doesn't check the MIME if link_external is presented?
This code helps me:
http://www.planetemu.net/index.php?sect ... &id=324727
Can you update PhocaDownload somehow, so Filename is not required, and download helper doesn't check the MIME if link_external is presented?
This code helps me:
Code: Select all
class PhocaDownloadHelperFront
{
function download($fileData, $downloadId, $currentLink) {
.....
if ($errorAllowed && !$externalLink) {
$msg = JText::_('COM_PHOCADOWNLOAD_WARNFILETYPE_DOWNLOAD');
$app->redirect(JRoute::_($currentLink), $msg);
} else if (!$errorDisallowed && !$externalLink) {
$msg = JText::_('COM_PHOCADOWNLOAD_WARNFILETYPE_DISALLOWED_DOWNLOAD');
$app->redirect(JRoute::_($currentLink), $msg);
} else {