[eluser]NateL[/eluser]
Not quite sure what I'm doing wrong here - but I've followed the user guide and when I do a var_dump() on my upload data, it's all empty. I'd appreciate any help
View
Code:
<?php
echo form_open_multipart('manage/portfolio/add_process');
?>
Title<br />
<input type="text" name="title" />
<br /><br />
Description<br />
<textarea cols="55" rows="10" id="description" name="description"></textarea>
<br /><br />
Thumbnail - <span style="color:red; margin:0; padding:0;">Must be 490 x 220</span>
<br />
<input type="file" name="userfile" size="20" />
<br /><br />
<input type="submit" value="Next - Step 2" />
controller: portfolio/add_process
Code:
$config['upload_path'] = '/images/portfolio/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$this->load->library('upload', $config);
$this->upload->do_upload();
var_dump($this->upload->data()) ; exit;
dumps this:
Code:
array(13) { ["file_name"]=> string(0) "" ["file_type"]=> string(0) "" ["file_path"]=> string(18) "/images/portfolio/" ["full_path"]=> string(18) "/images/portfolio/" ["raw_name"]=> string(0) "" ["orig_name"]=> string(0) "" ["file_ext"]=> string(0) "" ["file_size"]=> string(0) "" ["is_image"]=> bool(false) ["image_width"]=> string(0) "" ["image_height"]=> string(0) "" ["image_type"]=> string(0) "" ["image_size_str"]=> string(0) "" }