CodeIgniter Forums
problem with images - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: problem with images (/showthread.php?tid=2186)



problem with images - El Forum - 07-20-2007

[eluser]Unknown[/eluser]
hi every one i have a problem with uploading images

file_name: admin14.JPG
file_type: image/p
file_path: C:/wamp/www/CodeIgniter/system/application/views/uploads/
full_path: C:/wamp/www/CodeIgniter/system/application/views/uploads/admin14.JPG
raw_name: admin14
orig_name: admin.JPG
file_ext: .JPG
file_size: 72.15
is_image: 1
image_width: 1024
image_height: 768
image_type: jpeg
image_size_str: width="1024" height="768"

this is what happens when i do this
because of this code
Code:
$data = array('upload_data' => $this->upload->data());
but i only need this

file_name: admin14.JPG

the file name can any one tell a way to do that?
thanks for helping mi
and keep the good work with CI


problem with images - El Forum - 07-20-2007

[eluser]Rick Jolly[/eluser]
Code:
$data = array('upload_data' => $this->upload->data());
$file_name = $data['upload_data']['file_name'];

// or more simply
$data = $this->upload->data();
$file_name = $data['file_name'];