Welcome Guest, Not a member yet? Register   Sign In
Storing files (photos) in DB
#1

[eluser]Unknown[/eluser]
Hello everybody,
I'm pretty new to CI and I need help with uploading files. I know there is upload library class but it does not allow to store the file (its content) into the DB.

I have read
the forum about why/why not store files in DB and I decided to give it a try. Did anyone do it? What did you use? I wanted to use jQuery Multiple File Upload Plugin. I also find how to store/retrieve files to/from DB article.

I think I am able to put these together and make the solution which will work. I was wondering if anyone did the same before and can give me some useful advices.

Any help or comments will be very appreciated. Thanks in advance for them.
#2

[eluser]mattpointblank[/eluser]
Re-read Mirage's posts in that thread. He's spot on. My current project (which I inherited) started life storing all images in the database. It was an absolute nightmare extracting them all out and moving them into the filesystem and offered no benefits whatsoever. In fact, the site was slower (loads of database calls for basic stuff and the files won't cache in the browser), our database dumps were too big to backup daily and if we had to restore one it took forever.

Keep files in the filesystem. Honestly.




Theme © iAndrew 2016 - Forum software by © MyBB