Look at the data, the upload was discarded as there's an error. 1
equals UPLOAD_ERR_INI_SIZE
, and the cause for this is:
The uploaded file exceeds the
upload_max_filesize
directive inphp.ini
.
See http://php.net/manual/features.file-upload.errors.php
So you have to increase that value, and most probably also post_max_size
, see http://php.net/manual/features.file-upload.common-pitfalls.php for more information.
And once the uploading works, you'll have to use the correct keys, it's audio_1
, not audio_
, also you'll then have to use tmp_name
, ie this:
$this->request->data['Homepage']['audio_']['name']
should be this
$this->request->data['Homepage']['audio_1']['tmp_name']
On a side note, mime_content_type
is deprecated in favour of the Fileinfo
extension.