flash & database
- Started
- Last post
- 6 Responses
- Merlin
Customer wants to upload images and text in to a database, flash has to read the database and show the images and text. Only for one page, so no need for any big cms stuff. Anybody did this before.
- enobrev0
does the client actually want to store the images IN the database or just index a folder of images in a db?
- unfittoprint0
give the images an ID and a pth and insert that info on some database table.
- Merlin0
Client wants to store them in a database.
- unfittoprint0
The standard way is to place the images in some host's folder and use the database as a referrer to those files. It's much more practical like that.
- enobrev0
well that can be a tight situation as flash can only load swfs and jpgs.
You MAY be able to output the binary info of the image into a file and set the file headers with your favorite scripting language, although i've never tried it.
here's a forum post about how to do that in php / mysql: http://forums.devshed.com/archiv…
- enobrev0
btw, the ONLY reason i can think of it being beneficial to hold images in a db would be in a multiple server setup, and even then it's not a huge benefit, only a means of getting lal your data from one place.
the very BEST tried and true method is to save all your images in the file structure and index those images in the database.
Even in a multiple server setup, you can access those images by pointing to the "image server"
An actual con of storing all that binary information in your db is that the db size will get abnormally large muc hquicker and can potentially slow your queries site wide. Accessing the file system is almost always faster.