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

files dats array #22

@Hikingyo

Description

@Hikingyo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions