Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Ron Watkins <ron at argus dot lpl dot arizona dot edu>
Subject: Re: BLOBs
Date: Sep 24 1997 9:35PM

Hi group. I have beenpassivly watching the debate over this issue. I have 
also written code which works well. I use a sybperl API to select the 
image height,width from the imate table and create a line like thie 
following in my HTML output...

Where 1234 is the image key. The display.cgi routine selects the image 
data from the image table and sends it out to stdout PREPENDING the 
mime-type which is also in the database table. The output is of the form:

Content-type: image/gif

29r8 hw9fhq398fh29-8r128efh9q8fh9wfh9p89wh8fphpvh92qhf8aw...

It was fairly simple and we use DBlib to insert the images into the table 
allong with the mime-type,height and width.
You can see some samples of this actually working at the following url:
Traverse down one of the links, say "card", then select somthing like 
dining or shopping. Once there, you are able to select a region and get 
to a final page which if you view the source you will see the images are 
actually CGI's pulling image data from our image table. The upload is 
also automated using netscape's upload syntax inside a browser form the 
upload cgi parses the image content determines the mime-type and 
height,width and stores the data in the table...

		Ron Watkins