-when returning a file url for download, use the server address
that the server was contacted with.
This commit is contained in:
parent
77068086b0
commit
8b09f82aa3
|
@ -438,9 +438,11 @@ class StoredFile {
|
|||
* Get the URL to access this file.
|
||||
*/
|
||||
public function getFileUrl()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
return "http://$CC_CONFIG[baseUrl]:$CC_CONFIG[basePort]/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
|
||||
{
|
||||
$serverName = $_SERVER['SERVER_NAME'];
|
||||
$serverPort = $_SERVER['SERVER_PORT'];
|
||||
|
||||
return "http://$serverName:$serverPort/api/get-media/file/".$this->getGunId().".".$this->getFileExtension();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue