So I’ve been Googling this for a bit, can’t seem to find an answer.
From what I understand, this code: $this->upload->initialize() initializes the CI file upload class using the upload.php config file. What I want to do is use a different file.
I tried $this->upload->initialize('upload_other'), but that doesn’t seem to work. I know you can just set a $config array in the controller, but I’m trying to avoid that.
Is this possible? Am I approaching this the wrong way?
You can not Initialize / override configurations like that.
You can initialize by
OR you can do it by array as follows.
If you want to have anouther upload at same time you can change your config array.
UPDATE
you can specify your general data in config file. say
Now use in your controller like
this way you can reuse same settings.