Change download key parameter regex

This commit is contained in:
Duncan Sommerville 2015-11-17 19:51:41 -05:00
parent 6aafe25fd1
commit 4828e82d2a
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class PodcastEpisodes extends BasePodcastEpisodes
if ($podcast) {
$fileId = $this->getDbFileId();
$key = Application_Model_Preference::getStationPodcastDownloadKey();
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download?download_key=$key";
return Application_Common_HTTPHelper::getStationUrl(false)."rest/media/$fileId/download/$key";
}
return parent::getDbDownloadUrl();
}

View File

@ -60,14 +60,15 @@ class Rest_Bootstrap extends Zend_Application_Module_Bootstrap
/** MediaController Routes **/
$downloadRoute = new Zend_Controller_Router_Route(
'rest/media/:id/download',
'rest/media/:id/download/:download_key',
array(
'controller' => 'media',
'action' => 'download',
'module' => 'rest'
),
array(
'id' => '\d+'
'id' => '\d+',
'download_key' => '\w*'
)
);
$router->addRoute('download', $downloadRoute);