Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Upload error message
  • Hi Guys! How do i display user friendly errors in file upload? If I do print_r(\Upload::get_errors()); this is what i get:
    Array ( [0] => Array ( [name] => Tag-5th.jpg [type] => image/jpeg [error] => 101 [size] => 4003 [field] => userfile [key] => [file] => C:\wamp\tmp\phpF362.tmp [extension] => jpg [filename] => Tag-5th ) ) 
    

    Is there anything like the form validation for the file upload? Many thanks in advance.
  • You have to make the error messages yourself. Foreach over the errors returned and match 'error' against the defined error constants to display the correct message.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion