Change download key parameter regex
This commit is contained in:
parent
6aafe25fd1
commit
4828e82d2a
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue