Hello, I am trying to store images in a PostgreSQL 7.2 database using the Psycopg database adapter, running Zope 2.5.0 on redhat linux. I found a tip at http://lists.initd.org/pipermail/psycopg/2001-June/000200.html and tried it out. Unfortunately I get an error like "Can't parse object 'Gif123/'..." Is there any documentation on how to store images in a PostgreSQL database from Zope ? cheers, nico
nico@beehive.de wrote:
Hello,
I am trying to store images in a PostgreSQL 7.2 database using the Psycopg database adapter, running Zope 2.5.0 on redhat linux. I found a tip at http://lists.initd.org/pipermail/psycopg/2001-June/000200.html and tried it out. Unfortunately I get an error like "Can't parse object 'Gif123/'..."
Is there any documentation on how to store images in a PostgreSQL database from Zope ?
You need a postgres DA that supports commands for handling postgres Large Objects (loimport,getlo,unlink ...) As far as I know popy tries to store binary data into a bytea field ... don't know if it works. -- _______________________________________________________________________ Andreas Heckel andreas@easyleading.org
hi andreas, thanks! I do not use popy DA but Psycopg DA that supports commands for handling postgres large objects. I uploaded an image from the file system into my sql table using lo_import in a ZSQL mehtod. What I don't know is, how to store an image using a simple input form similiar to upload an image into the ZODB. Furthermore, I did not found any documentation on how to get the image from the database table to display it in DTML. Once I get it running, I should write a how-to. :-) nico On Tue, 23 Apr 2002, Andreas Heckel wrote:
nico@beehive.de wrote:
Hello,
I am trying to store images in a PostgreSQL 7.2 database using the Psycopg database adapter, running Zope 2.5.0 on redhat linux. I found a tip at http://lists.initd.org/pipermail/psycopg/2001-June/000200.html and tried it out. Unfortunately I get an error like "Can't parse object 'Gif123/'..."
Is there any documentation on how to store images in a PostgreSQL database from Zope ?
You need a postgres DA that supports commands for handling postgres Large Objects (loimport,getlo,unlink ...)
As far as I know popy tries to store binary data into a bytea field ... don't know if it works.
-- _______________________________________________________________________ Andreas Heckel andreas@easyleading.org
On Tue, 23 Apr 2002 nico@beehive.de wrote:
I do not use popy DA but Psycopg DA that supports commands for handling postgres large objects. I uploaded an image from the file system into my sql table using lo_import in a ZSQL mehtod. What I don't know is, how to store an image using a simple input form similiar to upload an image into the ZODB. Furthermore, I did not found any documentation on how to get the image from the database table to display it in DTML. Once I get it running, I should write a how-to. :-) Would be nice. On the other hand why not storing images using ExtFile or some other product which uses local file system?
Kind regards Andreas.
Hi Andreas, I developed a simple using ExtFile / LocalFS by storing the filepath in the SQL table. Anyway, now I want to develop a simple application which stores files and images in a postgresql database table so the data can also be used by other applications which does not work with Zope or local files. nico On Wed, 24 Apr 2002, Tille, Andreas wrote:
On Tue, 23 Apr 2002 nico@beehive.de wrote:
I do not use popy DA but Psycopg DA that supports commands for handling postgres large objects. I uploaded an image from the file system into my sql table using lo_import in a ZSQL mehtod. What I don't know is, how to store an image using a simple input form similiar to upload an image into the ZODB. Furthermore, I did not found any documentation on how to get the image from the database table to display it in DTML. Once I get it running, I should write a how-to. :-) Would be nice. On the other hand why not storing images using ExtFile or some other product which uses local file system?
Kind regards
Andreas.
participants (3)
-
Andreas Heckel -
nico@beehive.de -
Tille, Andreas