At 9:34 AM -0800 11/4/02, Gerardo Schimpf wrote:
Uploading the picture you can do using test/html/upload.htm as an example.Hello embperl fans!. I have a mysql table with a blob data type column and pictures stores in that column. How can I upload a picture and insert it into that column and display the picture on a HTML page?
Read the file in, stuff the bits in the database.
Displaying is a two part process. The HTML page should have a reference like:
<img src="/foo.html?imageid=xxx">
and foo.html should consist of nothing except embperl code, like so:
[-
$http_headers_out{'Content-Type'} = 'image/xxx';
$http_headers_out{'Content-Length'} = yyy;
spit out image data from database
while (...) { print OUT xxx; }
Apache::exit();
-]
You probably don't need the exit, I just do it to make sure no more data ends up on the output stream.
--
Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
