protected function uploadErrors($e)
{
$errors = array(UPLOAD_ERR_OK => "", UPLOAD_ERR_INI_SIZE => "Image is larger than the specified amount set by the server", UPLOAD_ERR_FORM_SIZE => "Image is larger than the specified amount specified by browser", UPLOAD_ERR_PARTIAL => "Image could not be fully uploaded. Please try again later", UPLOAD_ERR_NO_FILE => "Image is not found", UPLOAD_ERR_NO_TMP_DIR => "Can't write to disk, due to server configuration ( No tmp dir found )", UPLOAD_ERR_CANT_WRITE => "Failed to write file to disk. Please check you file permissions", UPLOAD_ERR_EXTENSION => "A PHP extension has halted this file upload process");
return $errors[$e];
}