EllisLab text mark
Advanced Search
     
Upload library error message
Posted: 25 September 2007 05:20 AM   [ Ignore ]
Joined: 2006-07-14
4237 posts

Hello,

It’s a little bug but it confused me for a while.

I got the message : Unable to find a post variable called userfile.
The error was that i didn’t add the enctype=“multipart/form-data” but i was looking in the post array and there was the userfile present.

Maybe the error message could be changed to : Unable to find a files variable called userfile. Which is also more accurate.

 
Posted: 05 November 2007 03:26 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-11-05
40 posts

I don’t know if you solved, but this happens because your script starts before you send something through the form, just write a little rule like this in your view page:

<?php echo ($_SERVER['REQUEST_METHOD'== 'POST') ? $error NULL?> 

Bye ;)