More about Image Content data instances

> When to use

Use an image content data instance to store an image that is referenced in a Data- class object that is not specific to an application. For example, if your application includes reference information about United States states in a class Data-State, you could associate a state flag or icon with each state.

As a best practice, do not reference an image content data instance that is application-specific. Store images that pertain to a specific application in binary file rules, not in image content data instances. That way, the images have the versioning, security, history, and other benefits of rule resolution, and travel with the rest of the application in RuleSet-based ZIP archives.

Use caution when deleting an image content data instance, or when uploading a new image to replace an existing image. Because image content instances are data — not rules — there is no easy way to determine whether other objects reference the image.

> Browser caching

The http requests generated for Data-Content-Image instances have by default an expiration time of seven days. This time period helps to avoid unnecessary http requests to the server, since instances of Data-Content-Image should not be updated often.

Therefore, if an instance of Data-Content-Image is updated with a new image, the browser cache must be deleted in order for the new image to be displayed.

> Example

When updating an Operator ID form, you can upload a JPG, GIF, or PNG image with the Operator ID instance. The system creates an Image Content data instance from your upload.

Using the contentURL JSP tag, you can retrieve the image during stream processing. For an example, review the standard HTML rule @baseclass.Operator-Profile-Full. This rule supports the display of the operator image in the Profile display.

If an image content data instance for an operator is associated with an operator ID, that file is retrieved and included in the My Profile display. If no data content data instance is associated with the operator ID, the default image from the binary file rule image.dialogprofileimage.gif appears.

About Image Content data instances