From: Adrian Tineo <adriantineo@softhome.net>
To: angelo.rigo@globo.com
To: pgsql-php@postgresql.org
Subject: Re: storing images
Date: Thu, 30 Jan 2003 11:57:06 +0100
Message-ID: <004b01c2c84e$5f31d1e0$f8ddd8d9@supercable.es> (raw)
References: <3E3139570001F57C@riosf06.globoi.com>
>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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: adriantineo@softhome.net, angelo.rigo@globo.com
Subject: Re: storing images
In-Reply-To: <004b01c2c84e$5f31d1e0$f8ddd8d9@supercable.es>
References: <3E3139570001F57C@riosf06.globoi.com> <004b01c2c84e$5f31d1e0$f8ddd8d9@supercable.es>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox