file upload issue [RESOLVED]

#1
[eluser]gafroninja[/eluser]
Hey Guys,

Yup you've guessed it, I have an issue with the file upload class. I'm sorry to bother people about it, but I feel I'm missing something and can't for the life of me figure it out. I've set the folders chmod 777.

view:
Code:
<?= form_open_multipart('admin/page_update/'); ?>
        
        <fieldset>
            <h3>Page Content</h3>
            <p>
                <label for="userfile">Main Image</label>
                &lt;input type="file" name="userfile" size="20" /&gt;
            </p>
            
        </fieldset>
        
        <p>
            &lt;input type="submit" value="upload" /&gt;
        </p>
        
    
    &lt;/form&gt;


controller:
Code:
function page_update()
        {            
            $this->pages_model->doImageUpload();    
        }

model:
Code:
var $pageImagePath;
    var $pageImagePathUrl;
    
    function Pages_model()
    {
        parent::Model();
        
        $this->pageImagePath = realpath(APPPATH . '../images/pages');
    }

function doImageUpload()
    {
        $config = array(
            'upload_types' => 'jpg|jpeg|gif|png',
            'upload_path' => $this->pageImagePath
        );
        
        $this->load->library('upload', $config);
        $this->upload->do_upload();
    }

The form does more, but ive removed all the excess to get this working. I hope you guys can help.

Thanks in advanced guys and gals.

Cheers,
Darren


Messages In This Thread
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 10:23 AM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 11:45 AM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 11:54 AM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 11:56 AM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 11:59 AM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 01:09 PM
file upload issue [RESOLVED] - by El Forum - 06-21-2010, 02:37 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.