CC-2403: Downloading a file via the web UI returns an absolute path, not relative

-fixed to take into account the base URL.
This commit is contained in:
martin 2011-06-24 16:04:57 -04:00
parent a5d2597875
commit 7607bce6c8
2 changed files with 5 additions and 4 deletions

View file

@ -449,10 +449,9 @@ class StoredFile {
* Sometimes we want a relative URL and not a full URL. See bug
* http://dev.sourcefabric.org/browse/CC-2403
*/
public function getRelativeFileUrl()
public function getRelativeFileUrl($baseUrl)
{
global $CC_CONFIG;
return "api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
return $baseUrl."/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
}
public static function Insert($md=null)