Property | Type | Description | |
---|---|---|---|
$allowed_types | string | Allowed file types | |
$client_name | boolean | Filename sent by the client | |
$detect_mime | boolean | MIME detection flag | |
$encrypt_name | boolean | Obfuscate filename flag | |
$error_msg | array | Error messages list | |
$file_ext | string | Filename extension | |
$file_ext_tolower | string | Force filename extension to lowercase | |
$file_name | string | Filename | |
$file_size | integer | File size | |
$file_temp | string | Temporary filename | |
$file_type | string | File type | |
$image_height | integer | Image height | |
$image_size_str | string | Image size string | |
$image_type | string | Image type | |
$image_width | integer | Image width | |
$is_image | boolean | Is image flag | |
$max_filename | integer | Maximum filename length | |
$max_filename_increment | integer | Maximum duplicate filename increment ID | |
$max_height | integer | Maximum image height | |
$max_size | integer | Maximum file size | |
$max_width | integer | Maximum image width | |
$min_height | integer | Minimum image height | |
$min_width | integer | Minimum image width | |
$mod_mime_fix | boolean | Apache mod_mime fix flag | |
$orig_name | string | Original filename | |
$overwrite | boolean | Overwrite flag | |
$remove_spaces | boolean | Remove spaces flag | |
$temp_prefix | string | Temporary filename prefix | |
$upload_path | string | Upload path | |
$xss_clean | boolean | XSS filter flag |
Property | Type | Description | |
---|---|---|---|
$_CI | object | CI Singleton | |
$_file_name_override | string | Filename override | |
$_mimes | array | MIME types list |
Method | Description | |
---|---|---|
__construct ( $config = [] ) : void | Constructor | |
data ( string $index = NULL ) : mixed | Finalized Data Array | |
display_errors ( string $open = '<p>', string $close = '</p>' ) : string | Display the error message | |
do_upload ( string $field = 'userfile' ) : boolean | Perform the file upload | |
do_xss_clean ( ) : string | Runs the file through the XSS clean function | |
get_extension ( string $filename ) : string | Extract the file extension | |
initialize ( array $config = [], boolean $reset = TRUE ) : CI_Upload | Initialize preferences | |
is_allowed_dimensions ( ) : boolean | Verify that the image is within the allowed width/height | |
is_allowed_filesize ( ) : boolean | Verify that the file is within the allowed size | |
is_allowed_filetype ( boolean $ignore_mime = FALSE ) : boolean | Verify that the filetype is allowed | |
is_image ( ) : boolean | Validate the image | |
limit_filename_length ( string $filename, integer $length ) : string | Limit the File Name Length | |
set_allowed_types ( mixed $types ) : CI_Upload | Set Allowed File Types | |
set_error ( string $msg, $log_level = 'error' ) : CI_Upload | Set an error message | |
set_filename ( string $path, string $filename ) : string | Set the file name | |
set_image_properties ( string $path = '' ) : CI_Upload | Set Image Properties | |
set_max_filename ( integer $n ) : CI_Upload | Set Maximum File Name Length | |
set_max_filesize ( integer $n ) : CI_Upload | Set Maximum File Size | |
set_max_height ( integer $n ) : CI_Upload | Set Maximum Image Height | |
set_max_width ( integer $n ) : CI_Upload | Set Maximum Image Width | |
set_min_height ( integer $n ) : CI_Upload | Set minimum image height | |
set_min_width ( integer $n ) : CI_Upload | Set minimum image width | |
set_upload_path ( string $path ) : CI_Upload | Set Upload Path | |
set_xss_clean ( boolean $flag = FALSE ) : CI_Upload | Set XSS Clean | |
validate_upload_path ( ) : boolean | Validate Upload Path |
Method | Description | |
---|---|---|
_file_mime_type ( array $file ) : void | File MIME type | |
_prep_filename ( string $filename ) : string | Prep Filename | |
set_max_size ( integer $n ) : CI_Upload | Set Maximum File Size |
protected _file_mime_type ( array $file ) : void | ||
$file | array | |
return | void |
protected _prep_filename ( string $filename ) : string | ||
$filename | string | |
return | string |
public do_xss_clean ( ) : string | ||
return | string |
public get_extension ( string $filename ) : string | ||
$filename | string | |
return | string |
public initialize ( array $config = [], boolean $reset = TRUE ) : CI_Upload | ||
$config | array | |
$reset | boolean | |
return | CI_Upload |
public is_allowed_dimensions ( ) : boolean | ||
return | boolean |
public is_allowed_filesize ( ) : boolean | ||
return | boolean |
public is_allowed_filetype ( boolean $ignore_mime = FALSE ) : boolean | ||
$ignore_mime | boolean | |
return | boolean |
public set_allowed_types ( mixed $types ) : CI_Upload | ||
$types | mixed | |
return | CI_Upload |
public set_image_properties ( string $path = '' ) : CI_Upload | ||
$path | string | |
return | CI_Upload |
public set_max_filename ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_max_filesize ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_max_height ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
protected set_max_size ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_max_width ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_min_height ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_min_width ( integer $n ) : CI_Upload | ||
$n | integer | |
return | CI_Upload |
public set_upload_path ( string $path ) : CI_Upload | ||
$path | string | |
return | CI_Upload |
public set_xss_clean ( boolean $flag = FALSE ) : CI_Upload | ||
$flag | boolean | |
return | CI_Upload |
public validate_upload_path ( ) : boolean | ||
return | boolean |
protected string $_file_name_override | ||
return | string |
public string $file_ext_tolower | ||
return | string |
public int $max_filename_increment | ||
return | integer |