Re: Data type for storing images? - Mailing list pgsql-general

From David Wall
Subject Re: Data type for storing images?
Date
Msg-id 012101c0abe1$3c3a0300$5a2b7ad8@expertrade.com
Whole thread Raw
In response to Data type for storing images?  (<drevil@sidereal.kz>)
List pgsql-general
> I am not sure what your exact purpose is, but in doing a lot of web
> work with pgsql, I usually just store the full path to the image in a
> varchar field and fetch that right into the IMG SRC attribute when I
> need to display the image.

Why would a full path in a IMG tag work?  Doesn't your web server use
relative paths based on its document root? If not, you have a serious
security hole allowing people to access any file on your system. <wink>

> I also have modified a simple web based image uploading script so upon
> uploading an image it detects the images width and height and inserts
> that into the DB as well.  The script is written in PHP, let me know
> if it would be helpful to send it to you.

I'd be interested in this script.  You'll probably need to send it either
"in place" thru the list, or as an attachment directly to me.

Thanks,
David




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: display temp table structure?
Next
From: "mike"
Date:
Subject: database schema designer