Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

files dats array #22

Open
Hikingyo opened this issue Dec 10, 2014 · 0 comments
Open

files dats array #22

Hikingyo opened this issue Dec 10, 2014 · 0 comments

Comments

@Hikingyo
Copy link

Hello everyone.
Sorry for the title : files data array
Thanks for this great lib that is very helpfull.
I've read about filtering $_FILES to turn uploads optionnals but i've already a problem when I want replace one file by an other in an array.
The new uploaded file have already index #0 and no more information to know exactly what fields was used or not .
To avoid my problem, i've just wrote this to have further control on library returns.
L 222 protected function _set_multi_upload_data($i){
L 439 $this->_set_multi_upload_data($i);
In this way, I can use <input type="file" name="files[str]"> ... and merging arrays become very easy.
Ex :
$array = array ( 'str' => 'value');
$files = $this->upload->get_multi_upload_data();
foreach ( $files as $k => $v)
{
$array[$k] = $v;
}
It is very helpfull in my case, create an object from multi upload form, and I hope this tricks help someone.
If I did some mistake, i'll read your answer carefully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant