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: David C Worenklein <dcw at gcm dot com>
Subject: Re: BLOBs
Date: Sep 24 1997 7:25PM

>>>>> "Michael" == Michael Peppler  writes:
    Michael> However, I don;t think you can display them directly if
    Michael> you expect to use something like a  tag
    Michael> (although I may very well be mistaken in this!)
    Michael> The work-around is to select your BLOB, shove it into a
    Michael> temp file, then set the SRC= when sending the
    Michael> rest of the html to the browser.
    Michael> Not very elegant, I know, but it should work, and if you
    Michael> have a reasonable cleanup routine (ie a cron job that
    Michael> removes old temp files) you shouldn't waste that much
    Michael> space.

If you're running Unix, you can make a named pipe (using mknod
tempfile p), say IMG SRC=tempfile, then write your image to this
tempfile (which will block until the other end reads the tempfile),
and then remove the file.

The drawback? If the other guy doesn't read your images (eg "Load
Images" is turned off), you'll block indefinately.  You can fix this
with a select that times out after a while.