Home > Contents > Index >
RENDER.GETBLOBURL
This tag creates a BlobServer URL without embedding it in an HTML tag (see also RENDER.SATELLITEBLOB ).
Syntax
<RENDER.GETBLOBURL OUTSTR="VariableName
" [BLOBTABLE="blobTable
"] [BLOBKEY="primaryKeyName
"] [BLOBWHERE="primaryKeyValue
"] [BLOBCOL="column name
"] [C="asset type
"] [CID="asset id
"] [ASSET="asset instance name
"] [FIELD="asset field name
"] [BLOBHEADER="MIMEtype
"] [BLOBNOCACHE="false
"] [ADDSESSION="true
"] [DYNAMIC="true
"] [CSBLOBID="session variable value"] [ASSEMBLER="uri assembler name"] [blobheadernameN="blob header name"] [blobheadervalueN="blob header value"] > </RENDER.GETBLOBURL>Parameters
OUTSTR (required)
- Input. Name of the variable that stores the URL generated by this tag.
BLOBTABLE (optional)
- Input. Name of a ContentServer database table that stores binary data. For example,
BLOBTABLE="ImageFile"
.
BLOBKEY (required, if BLOBTABLE set)
- Input. Name of the database column used as the primary key. Typically, this is
id
.
BLOBWHERE (required, if BLOBTABLE set)
- Input. Primary key value describing the row containing the binary data to be served.
BLOBCOL (required, if BLOBTABLE set)
- Input. Name of the database table column that contains the binary data. For example, for the Imagefile database table,
BLOBCOL="urlpicture"
.
FIELD (required, if BLOBTABLE not set)
- Input. The name of an asset field containing binary data to be served.
ASSET (optional)
- Input. Name of an asset instance.
C (required, if ASSET and BLOBTABLE not set)
- Input. An asset type name.
CID (required, if ASSET and BLOBTABLE not set)
- Input. An asset identifier.
BLOBHEADER (optional)
- Input. Mimetype for returned data, in the form
description/extension
. For example, the mimetype for a GIF image isimage/gif
.
BLOBNOCACHE (optional)
- Input. Whether to disable blob caching.
true
prevents the blob from being cached.
ADDSESSION (optional)
- Input. Whether or not to include session IDs in the URL when a browser is set to reject cookies.
true
means to encode session IDs in the URL. If this parameter is not specified, it is set totrue
by default.
DYNAMIC (optional)
- Input. Whether to create a static or a dynamic URL for the asset when the page is being rendered by the Export to Disk publishing method.
DYNAMIC=true
means to create a dynamic URL even ifrendermode
is set toexport
.DYNAMIC=false
means to create a static URL if rendermode is set toexport
. The default value isfalse
.
BLOBHEADERNAMEN (optional)
- This parameter sets HTTP header variables to suit your needs. The
BLOBHEADERNAME
parameter is used in conjunction with theBLOBHEADERVALUE
parameter to produce name/value pairs. This parameter represents the variable name.
BLOHEADERVALUEN (optional)
- This parameter is used in conjunction with
BLOBHEADERNAME
to specify and represent HTTP header variable values.
CSBLOBID (optional)
- The value of this parameter must correspond to a session variable of the same name when BlobServer security is on. When a request is made to the BlobServer, the
img src
service parameter sends a new request to the application server after the browser reads the containing page. BlobServer then verifies if thecsblobid
parameter was set. When BlobServer security is set to true and thecsblobid
value matches the session variable value, the blob is served. If the values do not match, a security violation is reported and no blob is served.
ASSEMBLER
(optional)- Short form name for uri assembler class. Specifying an assembler overrides the default assembler used by Content Server to construct URLs. Omitting this value will cause URLs generated by this tag to use the assembler registered with an index of 0 in the request property file.
Description
This tag creates a BlobServer URL. If rendermode is set to
export
, the tag creates a static URL (that is, a file name for an HTML file). It creates the URL based on the parameters described in the following section. These are a set of arguments that specify the table the blob is stored in, the name of the column that contains the binary data, the name of the primary key of the table, the value in that column to use to identify the object, and so on.If rendermode is set to
live
, the tag creates a dynamic URL by concatenating the following:
- The name of the server (which is the same server as the one serving the page that is requesting the URL).
- The approot (application root) of the application server software, which it obtains from the
ft.approot
property in thefuturetense.ini
file.
- The CGI path, which it obtains from the
ft.cgipath
property in thefuturetense.ini
file. For example, for WebLogic this path is/servlet/
and for iAS6, this path is/NASapp/cs/.
- The string
BlobServer?blobtable=
- The name of the table the blob is stored in, passed in through a parameter that is described in the following section.
- Other arguments, passed in as parameters that are described in the following section.
Based on this information,
RENDER.GETBLOBURL
creates a URL for the blob asset and returns it to the element that requested it in a variable specified by theOUTSTR
parameter. The requesting element can then use the variable in an HTML tag to create the link.To create BlobServer URL embedded in an HTML tag, use the RENDER.SATELLITEBLOB tag.
You can use
BLOBHEADERNAME
andBLOBHEADERVALUE
to specify http headers in the BlobServer response. For example, you can specify the content-type as follows:BLOBHEADERNAME1="Content-Type" BLOBHEADERVALUE1="image/gif"If you want to use http headers to prevent browser caching of BlobServer requests for all browsers, use both HTTP 1.0 and HTTP 1.0 cache control directives. In the following example, the first header (Cache-Control:no-cache) is the HTTP 1.1 directive and the second header (Pragma:no-cache) is the HTTP 1.0 directive.
BLOBHEADERNAME1="Cache-Control" BLOBHEADERVALUE1="no-cache" BLOBHEADERNAME2="Pragma" BLOBHEADERVALUE2="no-cache"NOTE: The table name containing the blob, the primary key of the table, the id of the table row, and the column name that contains the binary data are all optional parameters. The same information can be provided to this tag by specifying an asset type, id and field name, or an asset instance object name and field name. However, there is an advantage to using the latter forms. If the owning asset is changed, Blob Server will invalidate the cached blob, but only if it was served via one of the asset forms of the RENDER.GETBLOBURL tag.errno
None.
Examples
This code creates a BlobServer URL for an ImageFile asset identified through an ID passed in with
BLOBWHERE="Variables.asset:id"
and stores it in a variable named "theURL
":<RENDER.GETBLOBURL BLOBTABLE="ImageFile" BLOBCOL="urlpicture" BLOBHEADER="Variables.asset:mimetype" BLOBKEY="id" BLOBWHERE="Variables.asset:id" OUTSTR="theURL"/>This code does the same thing, but the cached blob will be invalidated when the ImageFile asset is modified:
<RENDER.GETBLOBURL C="ImageFile" FIELD="urlpicture" BLOBHEADER="Variables.asset:mimetype" CID="Variables.asset:id" OUTSTR="theURL"/>This code does the same thing, but uses an already-loaded ImageFile asset:
<ASSET.LOAD TYPE="ImageFile" OBJECTID="Variables.asset:id" NAME="myasset"/> <RENDER.GETBLOBURL ASSET="myasset" FIELD="urlpicture" BLOBHEADER="Variables.asset:mimetype" OUTSTR="theURL"/>See Also
RENDER.GETPAGEURL RENDER.SATELLITEBLOB
Home > Contents > Index > ![]()
FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.