Example #1
0
 /**
  * Upload a public image
  * -- Validates file type to have an image imei type
  * @param array $file
  * @return string|boolean 
  */
 public function image($file)
 {
     //Validate that it must be an image
     if (stripos($file["type"], 'image') === false) {
         return array('error' => 'Not an Image');
     } else {
         return Core_Helper_Upload::public_file($file);
     }
 }