Forum OpenACS Q&A: Response to BLOB in HTML

Collapse
4: Response to BLOB in HTML (response to 1)
Posted by Don Baccus on
Check out /packages/file-storage/www/download/index.vuh.  It will download an arbitrary content revision if you're using the content repository to store your blobs (which I recommend if you're using OpenACS 4).

Then in your ADP page just use an IMG tag with the URL pointing to the download/index.vuh script and the revision id as the argument (check the source).

If you're not using OpenACS 4 or not storing images in the content repository then you can still use this as a guide.  The general idea is to take the code snippet mentioned in the previous post, put it in a download file, define a parameter that tells it which database row contains the image, then call it from an IMG tag.