CodeIgniter Forums

Full Version: problem with images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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'];