Comments (6)
Solution for Codeigniter 3
Open MY_Upload.php around line 32 replace with;
public function initialize(array $config = array(), $reset = TRUE){
then change line 385 to
$this->file_name = sanitize_filename($this->file_name);
Remember to load
$this->load->helper('security');
in your Controller
from codeigniter-multi-upload.
I would assume (or at least hope) that Codeigniter 3 has multi-upload ability built it. I would also assume that Codeigniter 3 is going to break a lot of libraries, such as this CodeIgnite-Multi-Upload.
from codeigniter-multi-upload.
I am getting this error when I tried to upload file:
Severity: Runtime Notice
Message: Declaration of MY_Upload::initialize() should be compatible with CI_Upload::initialize(array $config = Array, $reset = true)
Filename: libraries/MY_Upload.php
Line Number: 444
Please guide us that how can we resolve this issue?
from codeigniter-multi-upload.
@ayyazzafar are you using CodeIgniter 2 or 3?
from codeigniter-multi-upload.
I modify a new version support "CodeIgniter 3"
from codeigniter-multi-upload.
In My_upload.php file replace the line 385 by the following code
//Sanitize the file name for security.
$this->file_name = sanitize_filename($this->file_name);
// Sanitize the file name for security
$this->file_name = $this->_CI->security->sanitize_filename($this->file_name);
from codeigniter-multi-upload.
Related Issues (20)
- Codeigniter 2.2.0 HOT 6
- Problem changing filenames HOT 2
- Resize on upload HOT 8
- get_multi_upload_data() returns an empty array? HOT 2
- How to get All uploaded file names HOT 2
- Display files that failed to upload HOT 1
- files dats array
- Advanced feature + script
- Oh, that's a piece of sh*t HOT 1
- 500 internal server error when uploading lots of files HOT 1
- Unable to locate the specified class: Session.php
- Sanitize Filename & Encrypt Name issue Codeigniter 3 HOT 4
- Declaration of MY_Upload should be compatible with CI_Upload HOT 1
- Declaration of MY_Upload should be compatible with CI_Upload HOT 8
- Call to undefined method MY_Upload::clean_file_name() HOT 1
- Can't Display get_multi_upload_data HOT 2
- Update library for run in CodeIgniter 3.x HOT 1
- Insert to database HOT 2
- Not working when i select attachments one by one
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter-multi-upload.