File Uploading Library - RoverWire/codeigniter-utilities GitHub Wiki

Official Codeginiter documentation file upload library reference

Configuration

Creates a base config array for file uploading.

Trigger: ciupconf

Results:

 $conf['upload_path']   = '/uploads/';
 $conf['allowed_types'] = 'gif|jpg|png';
 $conf['file_name']     = '';
 $conf['overwrite']     = FALSE;
 $conf['max_size']      = 0;
 $conf['max_width']     = 0;
 $conf['max_height']    = 0;
 $conf['encrypt_name']  = FALSE;

Upload data

Trigger: ciupdata

Results: $var = $this->upload->data();

Display errors

Trigger: ciupdisplay

Results: $this->upload->display_errors('<p>', '</p>');

Do upload

Trigger: ciupdo

Results: $this->upload->do_upload($field_name);

⚠️ **GitHub.com Fallback** ⚠️