-
Notifications
You must be signed in to change notification settings - Fork 158
Sanitize Filename & Encrypt Name issue Codeigniter 3 #28
Comments
sanitize file name done... is uset $CI =& get_istance on calling security->sanitize_filename() fiunction...thanks |
As described by @Aradea08 there is a relatively easy solution to this. Open the MY_Upload.php file which you've stored inside your application/library folder. Go to line 381. This is what it currently says: Replace the whole line with: That's it! |
Can you please help me I am getting: Message: Call to a member function sanitize_filename() on Line Number: 515 on null when try to upload the file. I have tried your solution but it's not working I am using codeigniter 3.1.9 and PHP 7.1.9 Please help it's very urgent Thanks in advance |
Hi @mayank-mehrotra, may be you want to try my PR #36. I try to fix this issue. Thanks |
Hello,
Thanks for your great work to this class.
I'm quite new in CI, and try to implement your class in my project.
but, i found some issues about your class in CI 3.
For temporary solution i just let the code to be like this
//Sanitize the file name for security. $this->file_name = $this->file_name;
So far, it work, but i don't think it safe.
here's is my code
// inisialisasi upload file $config = array( 'upload_path' => $dir, 'allowed_types' => 'jpeg|jpg|png', 'overwrite' => TRUE, 'encrypt_name' => TRUE, ); // load Upload library $this->upload->initialize($config); $this->load->library('upload', $config); $this->load->library('image_lib', $config);
but when i print_r it,
the result looks like this
`Array
(
[upload_data] => Array
(
)
`
Thanks in advance.
hope this issues fixed soon...
The text was updated successfully, but these errors were encountered: