PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at MBAY dot NET>
Subject: Re: BLOBs
Date: Sep 25 1997 12:12AM

Ron Watkins wrote:
> 
> 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...
> MORE IMAGE DATA HERE...
> 

Well - you learn new things every day :-)

This makes it really easy to store the data for the image in a sybase
table of the form

create table imageTable (key int, mimeType varchar(32), width int,
	height int, data image)

Cool!

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler