Welcome Guest, Not a member yet? Register   Sign In
Upload, Unzip, Get data
#1

[eluser]Ignacio[/eluser]
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 http://codeigniter.com/wiki/Unzip/, 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?

Thanks!
#2

[eluser]lmv4321[/eluser]
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.
#3

[eluser]Ignacio[/eluser]
lmv4321, thanks for your fast response, I'm trying to do something like that now, thanks again.




Theme © iAndrew 2016 - Forum software by © MyBB