Use Zend_File_Transfer instead of $_FILES

This should give us more information in the case of an error and is the framework idiomatic way to handle a RESTful file upload.

I'm hoping this helps debug https://github.com/LibreTime/libretime/issues/3
This commit is contained in:
Lucas Bickel 2017-02-21 20:55:03 +01:00
parent 4557395a86
commit 0b704e95f1
2 changed files with 15 additions and 3 deletions

View file

@ -92,8 +92,8 @@ class CcFiles extends BaseCcFiles {
//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'];
$originalFilename = $fileArray['file']['name'];
$tempFilePath = $fileArray['file']['tmp_name'];
try {
return self::createAndImport($fileArray, $tempFilePath, $originalFilename);