[ic] Serving the images from a database

Lars Segerlund konsult at sebab.se
Thu May 6 02:37:25 EDT 2004


 There is another reson, and that is to be able to rescale/resize the 
images for serving, ( thus ensuring that you get a decent bandwidth usage ).

 I will look into this, but I have just started to build my first 
'catalog' from scratch ..

 / Thanks a lot, Lars Segerlund.


Mike Heins wrote:

>Quoting Lars Segerlund (konsult at sebab.se):
>  
>
>>Has anyone served the images for interchange through the database ?
>>    
>>
>
>I have.
>
>  
>
>>I am thinking of putting a lot of images as BLOB's in an MySql database 
>>and perhaps caching them as files on the webserver/interchange server.
>>    
>>
>
>It works, but Interchange is not the fastest method for serving files.
>
>You could pretty easily make IC the 404 handler for images if you use
>Apache, and have it pull the image out and place it on the file system
>when requested.
>
>If you make "AcceptRedirect Yes" in interchange.cfg, IC will take
>Apache's redirects when you make it the handler for 404. You could
>intercept the request in Autoload, and:
>
>    * determine whether the request asks for an image/* MIME type
>    * pull the image out of the database and write it to disk
>    * deliver it with $Tag->deliver()
>
>Apache makes it relatively easy as I believe you get a PATH_TRANSLATED
>variable that tells you where the file should have been.
>
>  
>
>>I just wanted to know if this is done or there are any complications, I 
>>am fairly new to interchange so I'd rather ask before starting to 
>>implement, sorry for waisting the bandwidht.
>>    
>>
>
>No, that is an interesting application. It would certainly make it
>easier to transport a catalog, as finding the image path and 
>copying the images is one of the hardest part of moving the
>catalog around.
>
>  
>




More information about the interchange-users mailing list