/** * Create a new CCImage from upload * * @param string $key * @param string $type jpg|png|gif * * @return CCImage|false */ public static function upload($key, $type = null) { return static::create(CCFile::upload_path($key), $type); }