SlickUpload

Configuration

SlickUpload's configuration is controlled by Web.config settings in the <slickUpload> element.

<slickUpload handleRequests="boolean"
             scriptUrl="url to slickupload.js">
    <uploadProfiles defaultProfile="provider name">
        <add name="provider name"
             documentDomain="host name"
             maxRequestLength="number of kilobytes"
             executionTimeout="number of seconds">
            <uploadStreamProvider type="provider type" />
            <uploadFilter type="filter type" />
        </add>
    </uploadProfiles>
    <sessionStorageProvider type="provider type"
                            updateInterval="number of seconds"
                            staleTimeout="number of seconds" />
</slickUpload>

Configuration Elements

<slickUpload>

This is the root element of the SlickUpload configuration.

Attributes

handleRequests – Optional Boolean attribute
Boolean that specifies whether to handle requests. Default: true
scriptUrl – Optional String attribute
String that specifies the URL to use to load the SlickUpload JavaScript. If no url is specified, SlickUpload will automatically use WebResource.axd to include the version compiled into the SlickUpload assembly. Default: null

Child Elements

<uploadProfiles>

This element contains a list of the configured uploadProfiles that direct SlickUpload how and where to upload files. This element is required.

<uploadProfiles defaultProfile="provider name">
    <add name="provider name"
            documentDomain="host name"
            maxRequestLength="number of kilobytes"
            executionTimeout="number of seconds">
        <uploadStreamProvider type="provider type" />
        <uploadFilter type="filter type" />
    </add>
</uploadProfiles>

Attributes

defaultProfile – Optional String attribute
Specifies the default profile name to use if none is specified in the upload configuration. Default: null

Child Elements

<add> (uploadProfiles)

This element adds an upload profile configuration to the list of available upload profiles.

<add name="provider name"
        documentDomain="host name"
        maxRequestLength="number of kilobytes"
        executionTimeout="number of seconds">
    <uploadStreamProvider type="provider type" />
    <uploadFilter type="filter type" />
</add>

Attributes

name – Optional String attribute
Specifies the profile name for this upload profile. Default: null
documentDomain – Optional String attribute
Specifies the document.domain value to set in ajax handlers. Default: null
maxRequestLength – Optional Integer attribute
Specifies the maximum request length for this upload profile, in kilobytes. Default: 2097152
executionTimeout – Optional Integer attribute
Specifies the execution timeout for this upload profile, in seconds. Default: 86400

Child Elements

<uploadStreamProvider>

This element configures the provider SlickUpload uses to get streams to use to store uploaded files as they are uploaded. This element is required.

<uploadStreamProvider type="provider type" />

Attributes

type – Optional String attribute
Specifies the type of upload stream provider to use. See the list of available UploadStreamProvider types below.

UploadStreamProvider types

The following types are available:

<uploadFilter>

This element configures an upload filter class that allows you to specify code that will determine whether SlickUpload should handle or reject a request. This element is optional.

<uploadFilter type="provider type" />

Attributes

type – Optional String attribute
Specifies the type of your upload filter. This should be a reference to your custom provider class. The class reference syntax topic has more information on the reference syntax.

<uploadFilter type="YourNamespace.YourClassName, YourAssembly" />

<sessionStorageProvider>

This element configures the provider SlickUpload uses to store upload session information while an upload is in progress. This element is optional.

<sessionStorageProvider type="provider type"
                        updateInterval="number of seconds"
                        staleTimeout="number of seconds" />

Attributes

type – Optional String attribute
Specifies the type of session storage profile to use. See the list of available SessionStorageProvider types below. Defaults to Adaptive.
updateInterval – Optional Integer attribute
Specifies the the session update interval, in seconds. Default: 1
staleTimeout – Optional Integer attribute
Specifies the session timeout, in seconds. Default: 1800

SessionStorageProvider types

The following types are available: