Welcome Guest, Not a member yet? Register   Sign In
File Upload No Longer Working...help!
#1

Hello,
I am having an issue with my file uploader.  It seems that it has just stopped working altogether and I cannot figure out why.

Here is my coding:

HTML/Frontend
<div class="resume_upload_form">
                    <form action="<?=base_url('employment/seeker_resume_pdf_save/')?>" method="post" enctype="multipart/form-data">
                        <p><input type="file" name="resume_pdf" /></p>
                        <p><input type="submit" name="resume_upload" value="Upload Resume" /></p>
                    </form>
                </div>

Controller
PHP Code:
public function seeker_resume_pdf_save()
        {
            if(!
$this->ion_auth->in_group('Worker')){
                
redirect(base_url('employment/'));
            }

            
$user $this->ion_auth->user()->row();

            
$this->delete_resume_file($user->id);

            
$resume_pdf $this->input->post('resume_text'false);

            
$this->employment_model->set_resume_fields_to_null($user->id);

            
$config['upload_path'] = './assets/uploads/resumes/';
            
$config['allowed_types'] = 'pdf|doc|docx';

            
$this->load->library('upload'$config);

            
$this->upload->do_upload('resume_pdf');
            
$file $this->upload->data();

            
$this->employment_model->set_resume_pdf($user->id$file['file_name']);

            
redirect(base_url('employment/seeker_home/'));
        } 

When you go to upload the document, it IS saving the URL path and document file name in the database for the user profile BUT, the document is just not being uploaded to the server folder any longer.  So when you go to view the resume, you get a 404.  I thought it may have been a folder permissions issue but strangely enough, when I run a test using a simple php upload script outside of the CodeIgnitor install, I was able to upload the document to the assets/uploads/resumes folder without issue.  Its just within CodeIgnitor it no longer wants to work.  I am not getting any errors. 

Any help would be appreciated!

Thanks!
Lisa
Reply
#2

where is it in your view that you see an input with name "resume_text"? Because in here $resume_pdf = $this->input->post('resume_text', false); you are trying to retrieve it...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB