• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do you know the extension of the browsed file

When you are uploading an image, you pass a config array. this is how mine looks like

$config = array(
            'allowed_types' => 'jpg|jpeg|gif|png',
            'upload_path' => $this->gallery_path,
            'file_name' => '$filename'

So know, knowing the fact that i have allowed so many types while giving the file_name i don't know what extension to put?
please help! :roll:


watch out for "$this->upload->data()" in the User-Guide:

It gives you an array with much info about the uploaded file.

doen't give info of the file after the upload is done? I need the seeting before the upload so that the filename can be saved

Quote:... while giving the file_name i don’t know what extension to put?

Take a few seconds to read the user guide like suggested then you know
how to get the file-extention of the uploaded file. I guess the filename
without the extention is not your problem.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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