Jump to content

Archived

This topic is now archived and is closed to further replies.

shan_cool

Maintaining Images

Recommended Posts

Hi All,
I am in need to store and retrieve the photo's/images of employees ..
Initially i stored the entire image to the mysql database as a BLOB.... now i hav changed it in a way like... i store only the path of the image and while displaying am giving it in img src and echoing it.. it works fine...

I hav two questions here:

In my 1st method,
Will there be any pbm in storing images as BLOB? coz later i will b storing many number of images. will it affect my database?

In the 2nd method,
I need to maintain a folder containing the images of all... but thn it should be centralised in the server for all acces.now i hav done it locally(so that i hav to copy that folder to each machine).. how can i implement it? gimme some suggestions..

Rgds,
Shan...

Share this post


Link to post
Share on other sites
If you need a multi-server solution you're probably better off using your first method. There shouldn't be any problem saving binary information in a BLOB. You're limited to a query size of about a meg though, so you may have to be clever about it to save files larger than 1MB. Also note that BLOB is limited to 65kB, so you may want to use MEDIUMBLOB.

Multi-server solutions for method 2 do exist. For instance, regular synchronization via a cron job that does an FTP transfer. Also you could share a disk volume via Samba or NFS. Or you could just store images on a single server and make images from all sites pull from that URL. That might expose a domain you don't wish to expose, though.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.