You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
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.
$this->clean_file_name already not work in CI 3, also will encounter error if i change it to $this->security->sanitize_filename / even $this->security->xss_clean.
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.
Encrypt Name also not work, it return nothing when i set it to TRUE.
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: $this->file_name = $this->clean_file_name($this->file_name);
Replace the whole line with: $CI =& get_instance(); $this->file_name = $CI->security->sanitize_filename($this->file_name);
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
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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: