0
votes

Anyway, can anyone give me the error code definitions for when files are uploaded in cakePHP.

So my $this-data contains something like this,

Array ( [file] => Array ( [name] => cake.jpg [type] => image/jpeg [tmp_name] => /tmp/hp1083.tmp [error] => 1 [size] => 24530 ) )

What does [error] = 1 indicate?

While you're at it can you list the break down of all the numbers, then maybe it'll be easier for others to find it the future

Thanks!

1
Are you using a file upload component? If not, file upload error codes should be the same as the standard PHP error codes. I find it hard to believe that you can't google this answer. - Travis Leleu
When you're looking for cakephp file upload error codes, it is hard to google. I didn't realize it was the same array. - Get the Jaws of Life

1 Answers

5
votes

File upload has nothing to do with CakePHP.

$this->data contains what $_FILE contains, it is a HTTP/PHP specific array.

Documentation, $_FILE, and the error codes.