Skip site navigation (1) Skip section navigation (2)

Re: storing images

From: "Adrian Tineo" <adriantineo(at)softhome(dot)net>
To: angelo(dot)rigo(at)globo(dot)com, pgsql-php(at)postgresql(dot)org
Subject: Re: storing images
Date: 2003-01-30 10:57:06
Message-ID: 004b01c2c84e$5f31d1e0$f8ddd8d9@supercable.es (view raw or flat)
Thread:
Lists: pgsql-php

>I am searching for tutorials to store and properly display images using
>php-postgresql!
>
>What data type must be the image collumn on my database?
>how can i display the images ?
>how can i control the size of the stored image?

To include large objects (like images) in the database you need to use
BLOBs, I think the type for postgresql is "bytea". Check the docs. I seem to
remember that you inserted them by means of "lo_import" and extracted them
via "lo_export".

I am designing an application that needs images (who doesn't?) but I have
decided to store the images separately as usual images (gif, jpg) and store
in the database the link to those images, so I read the link from the
database and the php script loads the image from the link. I don't have any
special requirement for the security of the images, that is, if you knew the
link yourself you could load it in the browser but that is not important.

Adrian Tineo


In response to

Responses

pgsql-php by date

Next:From: Adrian TineoDate: 2003-01-30 11:10:56
Subject: Re: problem with select option
Previous:From: Matthew HoroschunDate: 2003-01-30 08:44:19
Subject: Re: URGENT : pgsql for windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group