diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index 337e3b80b..71e5f2ca6 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -90,19 +90,9 @@ class CcFiles extends BaseCcFiles { * files won't get removed from the organize folder. */ - //Extract the relative path to the temporary uploaded file on disk. - if (isset($fileArray["full_path"])) { - $fullPath = $fileArray["full_path"]; - $basePath = isset($_SERVER['AIRTIME_BASE']) ? $_SERVER['AIRTIME_BASE']."/srv/airtime/stor/organize/" : "/srv/airtime/stor/organize/"; - //$relativePath is the folder name(if one) + track name, that was uploaded via ftp - $filePathRelativeToOrganize = substr($fullPath, strlen($basePath)-1); - $originalFilename = $filePathRelativeToOrganize; - } else { - //Extract the original filename, which we set as the temporary title for the track - //until it's finished being processed by the analyzer. - $originalFilename = $_FILES["file"]["name"]; - } - + //Extract the original filename, which we set as the temporary title for the track + //until it's finished being processed by the analyzer. + $originalFilename = $_FILES["file"]["name"]; $tempFilePath = $_FILES['file']['tmp_name']; try { diff --git a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh index f0a00fbe9..aa543f853 100755 --- a/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh +++ b/python_apps/airtime_analyzer/tools/ftp-upload-hook.sh @@ -35,7 +35,7 @@ post_file() { # -f is needed to make curl fail if there's an HTTP error code # -L is needed to follow redirects! (just in case) - until curl -fL --max-time 30 $url -u $api_key":" -X POST -F "file=@${file_path}" -F "full_path=${file_path}" + until curl -fL --max-time 30 $url -u $api_key":" -X POST -F "file=@${file_path}" do retry_count=$[$retry_count+1] if [ $retry_count -ge $max_retry ]; then