Uploader API - v0.3

Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Uploader API - v0.3

flashURL

The flashURL is the URL or URI of the swfupload.swf file.

settings

The settings object is an optional collection of name-value pairs that configure the Uploader:

Name

Description

Values

Default

fileSizeLimit

maximum size for each file in bytes

 

"20480"

fileTypes

accepted file types

 

"*.*" // any file

fileTypesText

user-focused short description of which files are accepted

 

"image files"

fileUploadLimit

 

 

0

fileQueueLimit

 

 

0

elmUploaderControl

selector, or HTML that is the replacement element for httpUploadElm. In the case of using the Uploader in a dialog this is probably an element that contains an Add Files link or button

 

""

whenDone

URL, URI, or function to load when the user clicks the Done button. If empty the button dismisses the dialog or reloads the page.

 

""

whenCancel

URL, URI, or function to load when the user clicks the Cancel button. If empty the button dismisses the dialog or reloads the page.

 

""

whenFileUploaded

Function to call when the server reports a successful file upload. Passes two arguments, the client-side filename and the server response. This gives application-specific client code a way to coordinate with application-specific server code, so that, for example, a set of newly uploaded resource IDs can be passed to another page, or thumbnails of newly uploaded files can be displayed in another panel.

 

function(fileName, serverResponse) {}

postParams

usually set by the application to identify the current context for the upload

 

null

httpUploadElm

empty selector of the HTML element to replace on the page with the File Upload UI

 

""

continueAfterUpload

automatically display a new URL or close the dialog when the upload is complete

 

true

continueDelay

 

milliseconds

2000

queueListMaxHeight

maximum height in pixels for the file queue before scrolling

 

190

dialogDisplay

display the upload in a DHTML dialog

 

false

browseOnInit

indicates whether or not to automatically open the native Browse window

 

false

addFilesBtn

selector for the 'Add Files' button

 

".fluid-add-files-btn"

fragmentSelectors

Javascript object containing selectors for various fragments of the uploader markup

see "Selectors" below

var defaultSelectors = { upload: ".fluid-uploader-upload", resume: ".fluid-uploader-resume", pause: ".fluid-uploader-pause", done: ".fluid-uploader-done", cancel: ".fluid-uploader-cancel", browse: ".fluid-uploader-browse", fileQueue: ".fluid-uploader-queue", scrollingElement: ".fluid-scoller", emptyRow : ".fluid-uploader-row-placeholder", txtTotalFiles: ".fluid-uploader-totalFiles", txtTotalBytes: ".fluid-uploader-totalBytes", osModifierKey: ".fluid-uploader-modifierKey", txtFileStatus: ".removeFile", progress : ".fluid-progress", qRowTemplate: "#queue-row-tmplt", qRowFileName: ".fileName", qRowFileSize: ".fileSize", qRowRemove: ".fileRemove", };

debug

provides verbose debugging output both in the browser and to the console

 

false


Selectors

Name

Description

Default

upload

selector of the DOM element that triggers the upload action

".fluid-uploader-upload"

resume

 

".fluid-uploader-result"

pause

selector of the DOM element that triggers the pause action

".fluid-uploader-pause"

browse

selector of the DOM element that triggers the browse files action

".fluid-uploader-browse"

done

selector of the DOM element that triggers the done action

".fluid-uploader-done"

cancel

selector of the DOM element that triggers the cancel action

".fluid-uploader-cancel"

fileQueue

 

".fluid-uploader-queue"

scrollingElement

 

".fluid-scroller"

emptyRow

 

".fluid-uploader-row-placeholder"

txtTotalFiles

 

".fluid-uploader-totalFiles"

txtTotalBytes

 

".fluid-uploader-totalBytes"

osModifierKey

 

".fluid-uploader-modifierKey"

txtFileStatus

 

".removeFile"

progress

 

".fluid-progress"

qRowTemplate

 

"#queue-row-tmplt"

qRowFileName

 

".fileName"

qRowFileSize

 

".fileSize"

qRowRemove

 

".fileRemove"