CI 1.7 multi file upload. Possible? |
I just wrapped up writing this section in my book, actually. I don't have a 1.7 codebase lying around, but I don't think it changed that much.
The issue is that CI's Upload library doesn't support multiple files with the same name. Additionally, the $_FILES array likely isn't structured like you expect it to be. See the official PHP docs for an example. The simplest solution that I could come up with was to modify the $_FILES array directly to have a unique file name and data in a way that the Upload library can deal with it. The following function will do that for you: Code: public function restructureFilesArray($files) You can then use it in your controller something like: Code: public function index() |
Messages In This Thread |
CI 1.7 multi file upload. Possible? - by frobak - 01-12-2016, 07:36 AM
RE: CI 1.7 multi file upload. Possible? - by PaulD - 01-12-2016, 09:26 AM
RE: CI 1.7 multi file upload. Possible? - by kilishan - 01-12-2016, 01:56 PM
|