FileCatalyst Header Logo

HTTP Upload - Configuration Guide

A number of configuration options are available for the HTTP Servlet. All parameters are required to be present, even if the value is empty. Below is a list of all the parameters that can be modified.

ParameterDetails
server

Hostname for the FileCatalyst or FTP server which the servlet will connect to. If the HTTP Servlet is deployed on FileCatalyst Server then this field is automatically populated as 'localhost' i.e. it points to the FileCatalyst Server hosting the servlet

Default value: ""

user

Username for the account of the FileCatalyst or FTP server. This field is to be provided by each user logging in. Optionally, the server administrator can fill in this field for a shared account.

Default value: ""

pass

Password for the account of the FileCatalyst or FTP server. This field is to be provided by each user logging in. Optionally, the server administrator can provide a value for this field, although they should only do so if they also provide a username. This combination creates an automatic log in to a shared account.

Default value: ""

ek

This is the key that is used to encode/decode the string value you pass to the user, pass, and server parameters. Here is an example configuration. In this example, the server/user/pass strings are "192.168.1.100", "anonymous", and "fc@FileCatalyst.com" respectively. This illustrates how the parameters will look to anyone who inspects the connection values in your HTML:

var server = "8I7BLHN;8I8@5";
var port = "21";
var pass = "|vy&[)&yp*p&jx#((;j,t";
var user = "h~t$6!=$z";
var ek = "encryptkey";

If this field is left empty then a random key is generated on the fly to encrypt the provided username and password.

Default value: ""

remotedir

The remote directory on the FileCatalyst or FTP server into which the servlet will navigate to store files. In terms of security, the account is not "jailed" to this directory; however, uploaded files will be placed here. Some configurations may require a value of "/"

Default value: ""

port

The file server's port. If the HTTP Servlet is deployed on FileCatalyst Server then this field is automatically populated, preferring the secure port if available. The port value will fall back to "21" if not otherwise provided.

Default value: "" (blank is 21)

servletLocation
(required)

The fully-qualified URL of the HTTP Servlet. If the HTTP Servlet is deployed on FileCatalyst Server then this field is automatically populated to point to the HTTP servlet that is hosted by FileCatalyst Server's internal web server.

Default value: "" (must be replaced with URL)

successurl

The first of the "redirect after transfer" URLs, this must be an absolute, relative, or fully-qualified URL. Note that successurl is unique in that it also acts as the errorurl and cancelurl (see below) if those are not provided.

The redirect URL will also have query string appended, containing a list of files, statuses, and messages for use by the target resource.

Default value: ""

errorurl

If specified, an error will cause redirect to this URL.

The query string will contain a list of files, statuses, and messages for use by the target resource.

Default value: "" (will use successurl if not provided)

cancelurl

If specified, canceling a transfer will cause redirect to this URL.

The query string will contain a list of files, statuses, and messages for use by the target resource.

Default value: "" (will use successurl if not provided)

filesParam

Used in conjunction with the redirect URLs, this is the parameter used in the query string to designate the list of files. By default, the query string will therefore contain "&f={list}".

Default value: "f"

resultsParam

Used in conjunction with the redirect URLs and filesParam, this is the parameter used in the query string to designate the status of each file. Each status corresponds with a file in the query string list. Status codes are as follows:

  • 0: error
  • 1: success
  • 2: canceled
  • any other code: treated as "undefined"

Default value: "r"

sizesParam

Used in conjunction with the redirect URLs and filesParam, this is the parameter used in the query string to designate the size of each file. Each size corresponds with a file in the query string list, and represents a value in bytes.

Default value: "sz"

totalParam

Used in conjunction with the redirect URLs, this is the parameter used in the query string to designate the total size of the transfer, in bytes.

Default value: "t"

delimiter

Used in conjunction with the redirect URLs and related parameters, this is the delimeter to be used to separate values in parameter values.

Default value: "#,#"

showProgress

When true, a progress area is rendered into an element with the ID "transferProgress". This element must be present in the markup for showProgress to have any effect.

Default value: true

jsonProgress

The client-side application may request transfer update data via JSON, which has the benefit of using a non-blocking Ajax call. The UI is therefore refreshed directly. When set to false, the progress updates are taken directly from the upload's XHR. While this is more granular and visually appealing, it is less "truthful" about the file transfer, when compared to the JSON progress.

Default value: true

autostart

When using octet-stream transfer type, which includes a drag-and-drop interface, begin transferring files as soon as they are added to the queue.

Default value: false

transferType

The core presentation and functionality of the application depends on which transferType is selected. The "octet-stream" type is always preferred when available, as it uses the most efficient method for uploading and exchanging update data with the server.

Technical information: "octet-stream" uses an XHR2 object for each file transfer, allowing individual progress updates from both the client side (during the initial HTTP upload) and server side (during the web to file server FTP leg). The "form" type is included for use with legacy browsers, and uses standard form uploads. Consequently, the files are sent as a single large stream of data, making UI updates less granular.

Unless there is a need to restrict users from either of the available methods, you should use the default auto-detect setting.

Default value: "" (auto-detect)

Valid values: "octet-stream", "form", or "" (auto-detect)

protocolToFileServer

After files arrive at the web server, they are sent onward to a file server. When a FileCatalyst Server is being used, you have the option of setting it to use UDP or auto-detecting between UDP and FTP. However, since FTP is ubiquitous, it is the default.

Default value: "" (blank is FTP)

Valid values: "FTP", "UDP", "AUTO", "" (FTP)

sslToFileServer

Boolean to enable FTPS (for FTP servers) or SSL (for FileCatalyst Servers) for the transfer leg between the web server and file server. Note: you must have a correctly installed certificate in order to set this parameter to true.

Default value: false

checkServer

Boolean to toggle pre-checking the servlet. When true, on page load the client-side application will test for the availability of the HTTP Servlet. It is always a good idea to test this connection; however, you may already be testing it in another way. If so, you may set this parameter to false.

Default value: true

automaticallyRedirectAfterTransfer

A boolean to toggle redirects. When true and at least the successurl parameter is populated, a redirect will occur after the file transfer completes. If only successurl is populated, it will handle cancelations and errors as well. Otherwise, the URLs specified in cancelurl and errorurl will handle those redirects.

Default value: true

validateExtraForm

A boolean to toggle custom validation. The client-side web application always performs certain default validations to ensure a file transfer may take place; however, you may wish to also ensure other requirements (metadata fields, for example) are met. When this parameter is set to true, the file transfer will not start until a JavaScript function called "validateFcFormFields" returns true. If this parameter is set to true and no function called "validateFcFormFields" exists, the application will fail. In other words, when set to true, the presence of a function with that name becomes a requirement.

Default value: false

regex

Only files matching this regular expression may be added to the queue. Sample:

".*\\.(doc|zip|txt)"

Default value: ""

maxFiles

An integer for the largest number of files allowed for upload. Use 0 for unlimited. This value cannot override the value set in config.txt

Default value: 0

maxFileSize

An integer for the largest size (in bytes) an individual file may be in order to qualify for upload. Use 0 for unlimited. This value cannot override the value set in config.txt

Default value: 0

maxTotalSize

An integer for the maximum combined size (in bytes) all files in the queue may be in order to qualify for upload. Use 0 for unlimited. This value cannot override the value set in config.txt

Default value: 0

language

By default (no value provided), the client-side web application will use English. Any arbitrary language may be specified by examining the "formupload_config.js" file and copying the pattern set by the lang.english entries. If the new language object is called "french", then the language parameter must be populated with "french" in order for the values to be used.

Default value: "english"

showActionsColumn
(octet-stream only)

A boolean to toggle visibility of the "actions" column in the octet-stream UI. The "actions" column contains triggers for performing actions on an individual file transfer. Currently "cancel" is the only available action. Setting this parameter to false will hide the column.

Default value: true

showInitialProgressArea
(form only)

A boolean to reveal a "progress" area on pageload, for form transfers. By default, this area is hidden (false) until a transfer starts.

Default value: false

showDropArea
(octet-stream only)

A boolean to enable a "drop" target for drag-and-drop operations on the octet-stream UI. If false, the user is limited to the "browse" button.

Default value: true

showRedirectCheckbox

A boolean to render a checkbox allowing the user to toggle whether or not they are redirected after the transfer completes. The checkbox is initially set by the "automaticallyRedirectAfterTransfer" parameter, which itself is true by default.

Default value: true

formFileInputs
(form only)

When transferType is "form", this parameter determines the number of Browse buttons visible by default. The user always has the option to add more as needed.

Default value: 3