diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index 79176c049..b00b9a452 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -144,7 +144,8 @@ class Rest_MediaController extends Zend_Rest_Controller if (isset($whiteList["full_path"])) { $fullPath = $whiteList["full_path"]; $basePath = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/organize/" : "/srv/airtime/stor/organize/"; - $relativePath = substr($fullPath, strlen($basePath)); + $relativePath = substr($fullPath, strlen($basePath)-1); + } else { $relativePath = $_FILES["file"]["name"]; }