Lotus Notes FAQ Visit Our Sponsor!

Can you store transparent and animated GIF's in the Notes database for a site?

This was a useful technique in Internotes Web Publisher and TILE. You would store all the special GIF and JPEG files as attachments in the Using document for a database. When the web site was generated, these files would then be detached and placed in the same directory. This way, there is only one copy of these images which you'd reference in custom HTML for the site for generating backgrounds, etc.

Ideally, Notes would have something like a graphics link or file attachment link, but it doesn't. However, what you can do is use a URL to reference the file attachment where it lies:
Look up the Document ID for the document where you are storing your images
For the URL in your custom HTML code, use the database path, then the Document ID followed by /$file/filename.ext?OpenElement

Limitations are that:
The document can't be the About or Using documents
The URL can be broken if you delete the carrier document, so only generate the carrier document once
The URL will be broken if you are making a copy of the database instead of replicating

If you don't want the long Notes Document ID to be visible to your users, you can also do the following:
Create a blank database called webfiles.nsf.
Create a form called Web Files. On it, place an editable text field called Name, and a rich text field called Attachment.
Create a view called Files. Make the first column sorted with a formula of Name.
Compose a Web Files document. In the Name section, write "GIFanims". Attach the file (e.g. named animation.gif) in the attachments field.
The URL for this attachment: /webfiles.nsf/Files/GIFanims/$file/animation.gif.

Applies to Notes Versions: 4 4.5 4.6
Last Modified: January 6, 1998