The most recent version of this document can be found online at http://docs.360works.com/index.php/SuperContainer

Purchase a license or learn more about SuperContainer on the 360Works site

SuperContainer Documentation

SuperContainer eliminates the hassle of dealing with container fields in FileMaker. It runs as a web-based java application which allows you to upload, view, and download scaled images and files from an embedded web viewer in FileMaker (introduced in FileMaker 8.5).

It is an effective replacement for container fields in solutions which require users to read and store files associated with records in FileMaker container fields, and offers numerous advantages over container fields.

SuperContainer is designed to be used from within a Web Viewer layout element in FileMaker, by pointing the Web Viewer to a URL that uniquely identifies a file resource you wish to store. This URL can contain any number of arbitrary path components.

In addition, SuperContainer ships with a Companion Plugin that allows you to automate access to SuperContainer resources. Consult the documentation in the SuperContainer Companion Plugin directory for more details and examples.

Version 2 of SuperContainer introduced many new features, among them:

Contents

  1. Advantages of SuperContainer over container fields
  2. System Requirements
  3. Installation: Deployment Options
    1. Option 1: Using SuperContainer as a standalone server application
    2. Option 2: Installing SuperContainer with FileMaker Server Advanced
    3. Option 3: Installing SuperContainer with Tomcat
  4. Using SuperContainer in your FileMaker solution
    1. Registration
    2. SuperContainer URLs
    3. SuperContainer URLs
    4. Uploading Files
    5. Accessing Files
    6. Deleting Resources
    7. Using SuperContainer with FileMaker Go
    8. Specifying image dimensions
    9. Embedding authentication username and password in the URL
    10. Specifying a custom resolution
    11. Printing Images from SuperContainer
    12. Supported Image Formats and CoreImage rendering
  5. Using SuperContainer outside FileMaker
    1. Custom Web Publishing
    2. Java Integration
    3. RawData URLs
  6. Applet vs. NoApplet
    1. Applet Advantages
    2. HTML Advantages
  7. Customizing SuperContainer Appearance
    1. "style" URL parameter
      1. "style" URL parameter
        1. Layout Styles
        2. Alignment Styles (only applies with noapplet style)
        3. Title Font Styles (only applies with noapplet style)
      2. "background-color" URL parameter
      3. Customizing SuperContainer Behavior
    2. Self Signed SSL support
  8. SuperContainer Companion plugin
  9. File Storage
    1. Default locations for SuperContainer
      1. Mac OS X and Mac OS X Server
      2. Windows XP and Windows Server 2003
      3. Windows Vista, when running in Standalon mode
      4. Windows Vista, when running with Tomcat or FileMaker Server
    2. To configure a custom location
    3. web.xml Locations
      1. Mac FMS deployment
      2. Mac Tomcat deployment
      3. Windows FMS deployment
      4. Windows Tomcat deployment
  10. Advanced tips
    1. Creating custom styles
    2. Revision Tracking
    3. View Types
    4. Leveraging the Plugin
      1. Checking for plugin installation
      2. Setting the base URL
      3. Example upload dialog
      4. Example download dialog
    5. Portals
    6. Tying into FileMaker account privileges
  11. Integrating with or migrating from other FileMaker databases
    1. Importing legacy container data into SuperContainer
    2. Importing SuperContainer resources from the file system
  12. Support

Advantages of SuperContainer over container fields

All the Advantages of Embedding With the advantages of storing by reference Plus new and unique advantages not possible with regular container fields

System Requirements

If your computer does not have Java installed, you may download it at http://java.sun.com/javase/downloads/index.jsp

Installation: Deployment Options

You can run SuperContainer as a standalone application, or by bundling into FileMaker Server Advanced, or in your own copy of Tomcat. If you are upgrading from a version older than 1.3, be aware that the URL formats have changed in SuperContainer.

Note: There is an incompatibility with older versions of some 360Works plugins. If you are using other 360Works plugins, be sure to download new versions at http://360works.com/products/

Option 1: Using SuperContainer as a standalone server application

This approach is excellent for simple deployment, as well as for testing and development. There's no installation required, you just start the server and immediately begin using it. You will need to start the SuperContainerServer every time the machine it is running on is rebooted.

Macintosh or Windows: Double-click the SuperContainerServer.jar file to start the standalone application. Once the application is running, you should be able to view the opening page at http://localhost:8020/SuperContainer . The server application allows you to specify where uploaded files are stored, and customize several other settings. To restrict unwanted access to your SuperContainer files, enter a username and password in the options dialog.

Deploying SuperContainer in standalone mode on Mac OS X enabled CoreImage rendering support. See the Supported Image Formats and CoreImage rendering section for more information.

Note: the standalone application must be in the same directory as the SuperContainer application folder.

Option 2: Installing SuperContainer with FileMaker Server Advanced

This approach is recommended for advanced users if you are running SuperContainer on a dedicated server which is also running FileMaker Server (or Advanced) 8, 9, 10, 11, or FileMaker Server 12.

Copy the entire SuperContainer download folder to your server, and double-click the MacInstaller.jar (Mac) or WindowsInstaller.exe (Windows) file in the SuperContainer folder. The SuperContainer Installer takes care of the following for you:

Once installation is complete, restart the machine and then point your browser to http://serverAddress/SuperContainer.

If you have trouble running the installation file you can perform a manual installation as an alternative. Instructions for performing a manual installation of SuperContainer can be found on our Product Support Wiki.

Option 3: Installing SuperContainer with Tomcat

This approach is recommended for advanced users if you are running Linux, Solaris, or any other computer not running FileMaker Server Advanced.

You must have a copy of Tomcat (downloadable from http://tomcat.apache.org) installed and running.

  1. If desired, customize the settings found in the SuperContainer/WEB-INF/web.xml configuration file. You can customize the path where files are stored, as well as set a username and password to protect your SuperContainer files.
  2. Copy the SuperContainer folder into the Tomcat webapps folder.
  3. Restart Tomcat.
  4. Go to http://serverAddress:8080/SuperContainer to make sure that SuperContainer is running correctly. Note that the default port with Tomcat is 8080, instead of 8020 for standalone mode.

Using SuperContainer in your FileMaker solution

Let's walk through setting up SuperContainer for a sample FileMaker solution. We will assume for these examples that your server is called 'yourServer.com', and that you have a table occurrence called 'Asset' with a field called 'ID'. This ID field is how you want to reference your files on the server. Substitute the actual values for your situation.

Registration

By default, SuperContainer will run in demo mode, which must be restarted every 2 hours. It will also display a small "DEMO" flag on all pages. You can activate the software at http://yourServer.com:8020/SuperContainer/Registration after purchasing SuperContainer and receiving your license key. This will remove the "DEMO" flag and will no longer time out after 2 hours.

SuperContainer URLs

SuperContainer URLs

You will need to start by creating a web viewer in your FileMaker layout, and assign a SuperContainer URL to the web viewer. The first part of the URL is always:

http://yourServer.com:portNumber/SuperContainer/Files

or

http://yourServer.com:portNumber/SuperContainer/SingleFile

Where "Files/" points to a directory and "SingleFile/" points to a particular file within a directory (Example usage below).

After that, you specify where on the server you want the uploaded file to be stored. You can include slashes in the URL to store the files subfolders, like this:

/path/to/file

You can also specify optional parameters in the URL which affect the behavior of SuperContainer. See the Customizing SuperContainer Appearance section for more about how to customize the SuperContainer display.

Typically, you would include the name of the table and the unique ID of the record into the URL, so if SuperContainer is running on the default port of 8020 for our example 'Asset' table, your URL for record number 4321 would look like this:

http://yourServer.com:8020/SuperContainer/Files/Asset/4321

Additionally, if you know the filename that was present within record 4321 -- say, "myAsset.jpg" -- then you could use SingleFile/ to point directly to that file. For example:

http://yourServer.com:8020/SuperContainer/SingleFile/Asset/4321/myAsset.jpg

The FileMaker calculation to do this would look like this:

"http://yourServer.com:8020/SuperContainer/Files/Asset/" & myTable::ID
or
"http://yourServer.com:8020/SuperContainer/SingleFile/Asset/" & myTable::ID & myTable::filename

Note that the SuperContainer URL can contain as many elements as you like. If a given asset can have 3 images uploaded to it, you could either create a new table for holding the images, or use the following URL schema:

"http://yourServer.com:8020/SuperContainer/Files/Asset/" & myTable::ID & "/1"
"http://yourServer.com:8020/SuperContainer/Files/Asset/" & myTable::ID & "/2"
"http://yourServer.com:8020/SuperContainer/Files/Asset/" & myTable::ID & "/3"

Uploading Files

There are several ways to upload files to SuperContainer. The simplest is to drag a file or directory onto the SuperContainer window, which immediately uploads the file, displaying a progress bar during the upload process.

If you are looking at a SuperContainer URL which has no file uploaded to it, by default an "Upload file" button is displayed. You can use this button or right-click/ctrl-click to display a file chooser dialog. Select a file or directory to upload and click "OK", which then uploads the file, displaying a progress bar during the upload process.

Accessing Files

Once a file has been uploaded to SuperContainer, it is displayed at the current width of the browser window (for images) or displayed as a file icon (for non-images).

Double-click on a file to download the file to the local computer and open it in the default application for that file type. Alternately, you can right-click and choose "Open in default application".

To save a file to a custom location, right-click and choose Save file.... This opens a file chooser dialog where you can specify where to save the file.

To view a resource in your browser, right-click and choose View in browser. This opens a RawData URL in your browser which points to the raw file contents.

Deleting Resources

To delete a resource, use the "delete" button or context menu. Dragging a new file into SuperContainer will also delete any existing file.

Using SuperContainer with FileMaker Go

You do not need to change anything in SuperContainer to use it with FileMaker Go. SuperContainer will detect that it is being viewed in FileMaker Go and automatically switch to 'noapplet' mode, which means that it will use HTML instead of a Java applet (Java is not supported on iOS). There are a few behavior differences to be aware of when using SuperContainer with FileMaker Go:

If you would like to view the SuperContainer resource in a full-screen browser window in FileMaker Go, you will need to add a button or script that calls the 'Open URL' script step. The URL should be the regular SuperContainer URL with the word 'RawData' in place of 'Files' (see 'RawData URLs' below for more information). Thus, the script step would look like this:

Open URL[ Substitute( SuperContainer URL; "/SuperContainer/Files/"; "/SuperContainer/RawData/" ) ]

There is a 9-minute movie available on Youtube demonstrating SuperContainer features on FileMaker Go: http://www.youtube.com/watch?v=ZPw3uibJC_c

Specifying image dimensions

SuperContainer automatically detects the size of the web viewer or web page that it is displayed on, and generates a thumbnail to exactly match the display size. You do not need to do anything for this to work. However, you may optionally want to display the image at a different size than the web viewer. In that case, you can include a width and/or height parameter in your URL, like this:

http://yourServer.com:8020/SuperContainer/Files/Asset/4321?height=500
http://yourServer.com:8020/SuperContainer/Files/Asset/4321?width=400
http://yourServer.com:8020/SuperContainer/Files/Asset/4321?height=64&width=64

Embedding authentication username and password in the URL

If you have password-protected your SuperContainer installation and don't want users to be prompted for a username and password, you can embed this information directly into your URL. For a username of "bob" and password "secret", you can do the following:

http://bob:secret@yourServer.com:8020/SuperContainer/Files/etc...
Note: this is not a foolproof means of preventing users from finding out the username and password! The password will be shown briefly when loading the page, and again when clicking on a link to download the image.

Alternately, you can include the username and password as regular URL parameters (version 2.54 and later). To do this, include a username and password parameter in your SuperContainer URL, for example:

http://yourServer.com:8020/SuperContainer/Files/testing?username=bob&password=secret

This is useful for Internet Explorer users whose security settings prevent the browser from allowing authenticationi from being embedded in the URL.

Specifying a custom resolution

If you need to print images from SuperContainer, you can specify an optional resolution parameter, telling SuperContainer to display images as hi-res. The default resolution is 72. If you specify a different resolution, SuperContainer will return a large image, and will alter the HTML img tag to have the correct width and height.

Note: you should also specify style=noapplet when printing, and specify a maximum width/height.

Here is an example URL with a resolution parameter set:

http://yourServer.com:8020/SuperContainer/Files/xyz?width=64&height=64&resolution=300&style=noapplet

If the original image is large enough, this results in an on-screen image no larger than 64x64 pixels, with a resolution of 300 DPI. If the image is not large enough, the DPI will be scaled down to no less than 72 DPI.

Note: for performance reasons, you should only specify a resolution parameter for print-specific layouts. The server needs to do additional work analyzing the image if there is a resolution parameter, and the resulting image is also larger than necessary for on-screen viewing.

Printing Images from SuperContainer

SuperContainer is access from a web viewer, and because of this printing before your image has completely downloaded or the applet has been loaded is a possibility. To make sure that you do not print before you have completely downloaded your image from SuperContainer it is recommended that you do one of the following:

A. Download the image to an unstored calc using the SCGetContainer function of the SuperContainer Companion plugin - This solution will automatically download the image at the full resolution for printing, however you will need to have the Companion Plugin installed.

B. Use "noapplet" mode with a specified hight, width, and resolution parameter as well - This option still risks printing before your download has finished, but reduces some of the risk of your print not working properly due to the java applet. You may want to add a one or two second pause to make sure that your images completely download.

Supported Image Formats and CoreImage rendering

SuperContainer by default currently supports thumbnail generation for the following image formats: bmp, jpg, gif, png, jpeg2000, raw, pnm, and tiff (on some platforms). Some images may use a compression format that SuperContainer cannot resize. These will always be displayed as full-size images.

SuperContainer 2.0 and higher running in standalone mode on OS X uses OS X's CoreImage rendering to generate thumbnails. In addition to being significantly faster, CoreImage can render almost any image format you throw at it, including PDF, EPS, SVG, TIFF, Photoshop, and many more.

Note that CoreImage only needs to be running on the server, any client connecting to SuperContainer will see the rendered thumbnails. This means Windows FileMaker clients can see PDF content previews in their web viewers.

Using SuperContainer outside FileMaker

SuperContainer is a web-based application, so you can access it from anywhere you have a network connection. If you are using custom web publishing or writing tools in other languages, you can still have access to your SuperContainer data.

Custom Web Publishing

Version 2 of SuperContainer includes a PHP API for interacting with SuperContainer from your custom web publishing applications. Simply include() the PHP/supercontainer.php file in your PHP script, then use the included functions to upload, download, delete, and query the server.

See the SuperContainer PHP Documentation.html in the Support files/PHP directory of your SuperContainer download for more info.

Java Integration

There is a developer's Java API available separately. If you're writing a server-side java application or a desktop swing application, this provides an easy way to integrate with SuperContainer. Contact 360Works for more info on this.

RawData URLs

If you want to link directly to the contents of a SuperContainer file, you can use a RawData URL. Simple replace the word "Files" with RawData" in your SuperContainer URL, like this:

http://myServer.com:8020/SuperContainer/RawData/Asset/4321

If you know that a given resource is renderable by SuperContainer, you can inline the contents of the file in some other HTML page by using an img tag linked directly to the RawData URL, like this:

img src="http://myServer.com:8020/SuperContainer/RawData/Asset/4321"

Note that if Asset/4321 contains some non-image file, this will result in a broken image icon. A safer option is to use an iframe tag pointing to the Files URL for the given SuperContainer folderPath.

Applet vs. NoApplet

SuperContainer uses either a Java applet or an HTML interface for uploading, downloading, and displaying documents. You can explicitly specify which interface you want by adding the ?style=applet or ?style=noapplet parameter on to the end of your SuperContainer URL. See the section on Customizing SuperContainer Appearance for more details.

If you do not specify whether to use the applet or html interface, SuperContainer will use the best default, based on your browser and OS version. Users running Google Chrome, Firefox, or OS X Lion (10.7) will see the HTML view. All other users will see the Applet view.

Applet Advantages

HTML Advantages

Customizing SuperContainer Appearance

The appearance of a SuperContainer page can be customized by setting custom style and background-color parameters in your SuperContainer URL. Some styles affect which controls are visible or hidden, others affect the layout arrangement, and others modify the font of the resource title.

There are two primary modes SuperContainer has for displaying images: Plain HTML and a Java Applet. The plain HTML is lighter-weight and loads more quickly, the applet allows much more interactivity such as drag-and-drop support. The applet is used by default, unless a style of listview or noapplet is used in the SuperContainer URL.

"style" URL parameter

Specify a "style" url parameter to change the way a resource is displayed by SuperContainer. You can group multiple style names together with the "+" symbol. For example:

http://yourServer.com:8020/SuperContainer/Files/Asset/4321?style=readonly+bold+large

Here is a quick summary of the different styles that are available by default:

Layout Styles
(empty)
the default style looks like a container field, except there is an upload input if the resource is empty, and a delete button if it is non-empty.
listview
intended for use in list layouts, displays a small thumbnail or icon, with the filename to the right of it. All editing controls and other info are hidden. List view uses a default width and height of 64, but you can specify other dimensions by specifying your own width/height in the URL.
image_only
hides everything except the image or file icon.
showdelete
shows the delete button, which is not displayed by default. Note that the 'delete' context menu and DELETE key action are enabled by default.
nodelete
hides/disables the delete button, delete context menu, and DELETE key action.
upload
always show the upload button (even if the resource is non-empty).
noupload
never show the upload button (you can still upload a file by dragging or right-clicking).
readonly
hides the delete and upload buttons.
nopreview
hides the image or icon.
info
displays a table containing the filename, filesize, and date uploaded. This causes the title to be hidden, since that is included in the table.
title
always display the title, for both images and icons (by default, the title is hidden for images)
notitle
always hide the title
nolink
disable the hyperlink for the document. Clicking on a thumbnail or document will not do anything.
noapplet
Disables the applet view in SuperContainer 2. This will make SuperContainer work more like version 1.
noscroll
Hides scroll bars. Sometimes this is necessary when using very small (50px) web viewers, which display scroll bars even though the image would fit within the dimensions of the web viewer.
Alignment Styles (only applies with noapplet style)
left
aligns image, title, and controls to the left
right
aligns image, title, and controls to the right. There is no horizontal style to align to the center because that is the default.
center
aligns content in the center of the web viewer.
bottom
aligns content at the bottom of the web viewer. There is no 'top' style because that is the default.
Title Font Styles (only applies with noapplet style)
small, x-small, xx-small, large, x-large, xx-large
sets the title size
bold
bolds the title
italic
italicizes the title
smallcaps
displays the title in smallcaps

See the SuperContainer Example file for a demonstration of how setting different style parameters can affect the appearance of SuperContainer.

"background-color" URL parameter

Specify a "background-color" url parameter to set the background color of the BODY. This can be handy if you're using SuperContainer on a colored background, and want unused space to blend in. Note: this is not a style parameter, but its own separate URL parameter. So you might have a URL that looks like this (with a background color of rgb(10,20,30)):

http://localhost:8020/SuperContainer/Files/asdf?style=bold&width=123&background-color=rgb(10,10,255)

The background-color value can be a color name (green), rgb value (rgb(10,10,255)), or hex value (#336699). Note that for hex values, you'll need to escape the "#" symbol with a %23 in the URL.

http://localhost:8020/SuperContainer/Files/asdf?style=bold&width=123&background-color=%23336699

Customizing SuperContainer Behavior

To disable opening a SuperContainer file in a new browser window, uncheck the Allow interaction with web viewer content checkbox in FileMaker for the Web Viewer component. You can then assign a button action to the web viewer to trigger a script when the web viewer is clicked.

Self Signed SSL support

selfsignedssl URL parameter will allow SuperContainer applet to interact with SuperContainer server which is accessed via a self signed SSL certificate.

By default Java applets only support fully valid SSL certificates. Example:

https://localhost/SuperContainer/Files/asdf?selfsignedssl

SuperContainer Companion plugin

Everything outlined in this document can be done without any plugins or software to install on your user's computers. However, there are some advanced features and workflow automation that can be accomplished using the SuperContainer companion plugin, which is included with SuperContainer. See the documentation.html file in the SuperContainer Companion Plugin folder for more information.

File Storage

Default locations for SuperContainer

Mac OS X and Mac OS X Server

/Users/Shared/SuperContainer

Windows XP and Windows Server 2003

C:\Documents and Settings\SuperContainer\Files

Windows Vista, when running in Standalon mode

C:\Users\username\SuperContainer\Files

Windows Vista, when running with Tomcat or FileMaker Server

C:\Users\SuperContainer\Files

To configure a custom location

Standalone: use the Option panel to specify a custom path.
Tomcat or FMS deployment: use the web.xml file to specify a custom path.

web.xml Locations

Mac FMS deployment

/Library/FileMaker Server/Web Publishing/publishing-engine/cwpe-tomcat/bin/SuperContainer/WEB-INF/web.xml

Mac Tomcat deployment

TOMCAT_HOME/webapps/SuperContainer/WEB-INF/web.xml

Windows FMS deployment

C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\cwpe-tomcat\bin\SuperContainer\WEB-INF\web.xml

Windows Tomcat deployment

TOMCAT_HOME\webapps\SuperContainer\WEB-INF\web.xml
Note: When specifing a custom location make sure that SuperContaier will have read/write privileges to the parent folder, thumbnails directory will be created in the same folder as the custom location.
Note: C: represents the drive letter of the system drive.

Advanced tips

Creating custom styles

Advanced users can also define custom styles by editing the custom.css file in the SuperContainer application directory. You can also contact us for support if you'd like help with customized styles.

Revision Tracking

You can control your own version tracking by appending a revision number to your SuperContainer URLs, like this:

http://yourServer.com:8020/SuperContainer/Files/Asset/4321/revision2?style=nodelete

Since SuperContainer treats each slash in your URL as a folder, this will cause it to reference the 'revision2' subfolder inside folder '4321'. By removing the delete option, you can use this to make sure that a history all files is kept.

See the SuperContainer Example file for a demonstration of this technique.

View Types

In the example URLs above, notice the "/Files/" portion after the application base URL. This specifies the view type to use. 99% of the time you will be using the Files view type for your URLs. If you want to return the raw data for a resource, you can use RawData instead. This can be handy if you are referencing a SuperContainer resource from another URL, or using some tool to get the contents of a supercontainer resource file. The companion plugin uses the RawData view type to pull data from SuperContainer.

Leveraging the Plugin

For fine-grained control over your workflow, you can set all your web layouts to use the readonly style, and use the plugin for all editing purposes. This allows you to build custom actions into scripts that occur whenever an item is uploaded. This makes implementing revision tracking much easier (see above). You could also utilize something like the 360works Textractor plugin to store the text of any uploaded documents in FileMaker.

Here are some example scripts you can integrate with your solutions. These illustrate error-checking best practices, and helpful ways to utilize the plugin functions.

Checking for plugin installation

If the user does not have the SuperContainer plugin installed, you may choose to exit the script, or take her to a different layout which uses a web viewer to upload/download files instead of the plugin. To check whether the plugin is installed, use the following method:

# Exit if plugin is not installed
If[SCVersion = "?"]
 Show Custom Dialog ["SuperCOntainer Plugin is not installed."]
 Halt Script
End If

Setting the base URL

You must always set the supercontainer base URL before calling other plugin methods. A good time to do this is in your startup script.

Set Variable[$result; Value:SCSetBaseURL("http://yourServer.com:8020/SuperContainer/Files")]
If [$result = "ERROR"]
 Show Custom Dialog ["Could not connect to SuperContainer Server!"; SCLastError]
End If

Example upload dialog

Use the following script to upload a file to SuperContainer using the plugin. This shows a file chooser dialog. When a file is selected, it is uploaded to SuperContainer, and the web viewer is refreshed to show the new file. This demonstrates usage of the plugin functions SCChooseFile, SCSetContainer and SCLastError. Note that you need to give your web viewer a name ("webviewer" in this example) for the Set Web Viewer script step to work correctly.

# Do the upload
Set Variable [$result; Value:SCSetContainer(Get ( LayoutTableName ) & "/" & ID ; SCChooseFile)]
# Check for error during upload
If [$result = "ERROR"]
 Show Custom Dialog ["Could not upload file"; SCLastError]
End If
# Refresh the web viewer to show the new file
Set Web Viewer [Object Name: "webviewer"; Action: Reset]

Example download dialog

If you wish to open a SuperContainer file locally instead of opening it in the user's browser, you can use the plugin to look for the file on a mounted volume, or download it to the user's local hard drive. You might make the web viewer a button which triggers the following script to download the file. The following script demonstrates uages of the plugin functions SCGetFileURL and SCDownload.

Set Variable[$folderPath; Value: Get ( LayoutTableName ) & "/" & ID]
If [IsEmpty ( SCGetInfo($folderPath) ) ]
 # There is no file to open
 Exit Script
End If
Show Custom Dialog ["Do you want to open the file in your web browser, or download it to your local drive?"]
If [Get(LastMessageChoice) = 1]
 # Open in web browser. Note we reference "RawData" instead of "Files"
 Set Variable [$url; Value: "http://myServer.com:8020/SuperContainer/RawData/" & $folderPath]
Else If [Get(LastMessageChoice) = 2]
 # Download a local copy of the file and open that. This will be a "file://" url.
 Set Variable [$url; Value: SCDownload( $folderPath )]
 If [$url = "Error"]
 Show Custom Dialog ["An Error occurred while download the file" ; SCLastError]
 Exit Script
 End If
Else
 # User clicked 'cancel'
 Exit Script
End If
Open URL [$url]

Portals

Web Views cannot be embedded in portal rows. If you want to display SuperContainer files in a portal, create an unstored calculation in the portal table whose type is "container". Set the calculation to LeftValues ( SCGetInfo("path/to/my/record" ) ; 1 ). This calculation will use the plugin to display the name of the resource in the portal. <p> If you're sure that only images will be used in a container and you want to display thumbnail views of the images, you can use the following calculation instead: SCGetContainer("path/to/my/record" ; 64 ; 64). Adjust the path, width, and height for your needs. The drawback with this is, if the container contains non-image data, the entire file will be downloaded each time the portal is displayed!

Tying into FileMaker account privileges

By default all FileMaker users have equal access to SuperContainer. Even if a user has read-only access in FileMaker, SuperContainer has no way of knowing that, unless you specify additional parameters in the URL.

To disable uploading and deletion for FileMaker users with read-only access, you can use a calculation like this to generate your SuperContainer URL:

"http://yourServer.com:8020/SuperContainer/Files/" & Get ( LayoutTableName ) & "/" & ID & "?style=" &
If (Get(PrivilegeSetName) = "[Read-Only Access]" ; "readonly" ; "")

The above appends a "readonly" style name if the FileMaker user is in the Read-Only Access privilege set. You can also use this technique to allow all users to upload, but only admins to delete (by using the nodelete style).

Integrating with or migrating from other FileMaker databases

Importing legacy container data into SuperContainer

If you are migrating an existing FileMaker solution to use SuperContainer, you need a way to move your existing container fields over to SuperContainer. You can accomplish this by using the SuperContainer Companion Plugin. Simple write a script that loops through your records and call SCSetContainer("Asset/" & Asset::ID ; Asset::OldContainerField) for each record you wish to move over. See the Companion Plugin documentation for more details, or watch a video demonstrating how to do this at http://www.360works.com/supercontainer/demos/set_container/

Importing SuperContainer resources from the file system

If you have a directory full of files you wish to add to SuperContainer, you can either copy them to the directory where SuperContainer stores its files, or use the companion plugin function SCScanDirectory to return a list of files in a directory. You can optionally set a flag to scan for files recursively. See the Companion Plugin documentation for more details.

Support

You can contact 360Works at (770) 234-9293, or on our website at http://www.360works.com. We include one hour of support with all products that we sell. After that time, our standard hourly rate applies to all support.