CodeIgniter Forums

Full Version: Upload, Unzip, Get data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hello everybody, I'm trying to build a webapp.

I need Upload .zip files. Easy, using the File Uploading Class.

Now, Unzip the file. Using the Zip Encoding Class, or, I didn't test it yet, but this is not the issue.

Now the problem, I want to get the data ($this->upload->data()Wink for each of the files on the .zip.

This can be done? Any idea?


El Forum

I would create an empty temp directory and then unzip the files to this directory. Then using the File Helper, get a list of the file names. Then again using the File Helper, loop thru these file names and read in the data and do what ever else you want with them.
When done with the files, delete the files and the temp directory.

El Forum

lmv4321, thanks for your fast response, I'm trying to do something like that now, thanks again.