Insert leading slash into basedir for station URL
This commit is contained in:
parent
1ad024ca8d
commit
5acad059de
|
@ -31,6 +31,9 @@ class Application_Common_HTTPHelper
|
|||
if (empty($baseDir)) {
|
||||
$baseDir = "/";
|
||||
}
|
||||
if ($baseDir[0] != "") {
|
||||
$baseDir = "/" . $baseDir;
|
||||
}
|
||||
$stationUrl = "$scheme://${baseUrl}:${basePort}${baseDir}";
|
||||
|
||||
return $stationUrl;
|
||||
|
|
|
@ -160,7 +160,7 @@ class CcFiles extends BaseCcFiles {
|
|||
throw new Exception("Bad file extension.");
|
||||
}
|
||||
|
||||
$callbackUrl = Application_Common_HTTPHelper::getStationUrl() . "rest/media/" . $file->getPrimaryKey();
|
||||
$callbackUrl = Application_Common_HTTPHelper::getStationUrl() . "/rest/media/" . $file->getPrimaryKey();
|
||||
|
||||
Application_Service_MediaService::importFileToLibrary($callbackUrl, $filePath,
|
||||
$originalFilename, self::getOwnerId(), $copyFile);
|
||||
|
|
Loading…
Reference in New Issue