Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function upload_foto($data,$no_pendaftaran)
- {
- $config['upload_path'] = './files/scan_foto' ;
- $config['allowed_types'] = 'jpg|jpeg|png';
- $config['max_size'] = '400';
- $config['remove_space'] = TRUE;
- $config['file_name'] = $data.$no_pendaftaran;
- $this->load->library('upload', $config,'foto_upload');
- $this->foto_upload->initialize($config);
- if (!$this->foto_upload->do_upload($data)){
- return array('result'=>FALSE,'file'=>'','error' => $this->foto_upload->display_errors());
- }
- else{
- return array('result'=>TRUE,'file'=>$this->foto_upload->data(),'upload_data' => $this->foto_upload->data());
- }
- }
- public function upload_ktp($data,$no_pendaftaran)
- {
- $config['upload_path'] = './files/scan_ktp' ;
- $config['allowed_types'] = 'jpg|jpeg|png';
- $config['max_size'] = '400';
- $config['remove_space'] = TRUE;
- $config['file_name'] = $data.$no_pendaftaran;
- $this->load->library('upload', $config,'ktp_upload');
- $this->ktp_upload->initialize($config);
- if (!$this->ktp_upload->do_upload($data)){
- return array('result'=>FALSE,'file'=>'','error' => $this->ktp_upload->display_errors());
- }
- else{
- return array('result'=>TRUE,'file'=>$this->ktp_upload->data(),'upload_data' => $this->ktp_upload->data());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement