Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $jam = time();
- $propose_id = $this->input->post('id', 'true');
- $username = $this->input->post('username', 'true');
- $config['file_name'] = 'Proposal_' . $propose_id . '_' . $username . '_' . $jam . '.pdf';
- $config['upload_path'] = './upload_file/proposal/';
- $config['allowed_types'] = 'pdf';
- $config['overwrite'] = true;
- $config['max_size'] = 0;
- $this->load->library('upload');
- $this->upload->initialize($config);
- if (!$this->upload->do_upload('file_pdf')) {
- $response['status'] = 'error';
- } else {
- $this->hasil_m->upload_data();
- $response['status'] = 'success';
- }
- echo json_encode($response);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement