The mgiEncryptURL Tag
The mgiEncryptURL tag encrypts the URL to files and streams the files to the browser for display or download. For common files, appropriate MIME types are transmitted for interpretation by the browser.
The mgiEncryptURL tag has a beginning tag with one required parameter and two optional parameters, a body, and an ending tag. The tag form is:
<mgiEncryptURL mode="Display/Link" linkText="String" linkImage="Image Path" serverName="Server Address"> Relative Path to File </mgiEncryptURL>
Example Usage and Output
<mgiEncryptURL mode="Display"> images/image14.jpg </mgiEncryptURL>
In this example, an image resides on the same server as the page containing mgiEncryptURL. The path to "image14.jpg" is encrypted and the image is streamed to the browser and is displayed at the location of the mgiEncryptURL tag. In the source view of the browser, the path to the image might look like the following:
File Download and Stream
<mgiEncryptURL mode="Link" linkText="Download Your Software Purchase Here"> downloads/v15/dragonslayer.hqx </mgiEncryptURL>
In this example, a software file resides on the same server as the page containing mgiEncryptURL. The path to the file "dragonslayer.hqx" is encrypted and the file is streamed to the browser. Since the .hqx suffix is likely mapped in the browser for a particular application, the file is downloaded and opened by the application.
Remote File Download and Stream
<mgiEncryptURL mode="Link" linkText="Download Your Software Purchase Here" serverName="downloads.domain.com"> powersoftware/downloads/v15/dragonslayer.hqx </mgiEncryptURL>
In this example, a software file resides on a remote server (in the folder structure WebSTAR Root/powersoftware/downloads/v15/dragonslayer.hqx). The address "downloads.domain.com" is mapped to the WebSTAR Root folder therefore the required path structure is "powersoftware/downloads/v15/dragonslayer.hqx". The path to the file "dragonslayer.hqx" is encrypted and the file is streamed to the browser by the remote server (Note: the remote server must be running a copy of MGI Server 1.5 or later).
[Return to the Referencing MGI Menu]
[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]