• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get uploaded file data in CI 4

#1
In Codeigniter 3, $this->upload->data(); does it. In documentation of CI 4, I found some functions for getting specific uploaded file data like, getName(), getClientName(), getClientMimeType() etc. But how can I get all the uploaded file data at once like CI 3?

I am using $file->store(); to upload file.

Thanks in advance.
"Who thinks in code"
Perfectly describes who I am
webdevron.com
Reply

#2
All of the parameters are in the $_FILES[] array.

PHP Code:
$file_name     $_FILES["photo"]["name"]; 
$file_type     $_FILES["photo"]["type"]; 
$file_size     $_FILES["photo"]["size"]; 
$file_tmp_name $_FILES["photo"]["tmp_name"]; 
$file_error    $_FILES["photo"]["error"]; 

Where photo would be the input name.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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