jQuery.fn.glowMultiUpload
Renders a multi-file upload input supporting chunked uploads with visual progress bars
Usage
$('SELECTOR').glowMultiUpload(options)
where 'SELECTOR' is a div element containing a file input
Options
-
fileFilter
: Array of filters to apply when selecting files. Each filter is an object with format{ title : "Zip files", extensions : "zip" }
- default: null
-
maxFileSize
: Maximum file size of a selectable file (0 for unlimited).- default: 0
-
width
: Width of control- default: '350px'
-
height
: Height of control- default: '200px'
-
uploadUrl
: URL to upload against. With Studio Widgets, this is the result of a call to create a context ID and build an upload URL for it:$core_v2_uploadedFile.GetUploadUrl($core_v2_uploadedFile.CreateContextId())
- default: '/'
-
maxFileCount
: Maximum selectable files to upload- default: 5
-
fileList
: Default- default: []
-
uploadedFormat
: HTML template to use for an uploaded item- default: '<div style="overflow: hidden; text-overflow: ellipsis; color: #000; padding: .25em;"><div style="float: right; color: #3a3; margin-left: .25em;">Uploaded</div>{0}</div>'
-
uploadingFormat
: HTML template to use for an uploading item- default: '<div style="overflow: hidden; text-overflow: ellipsis; color: #000; padding: .25em;"><div style="float: right; margin-top: .25em; margin-left: .25em; border: solid 1px #999; background-color: #eee; width: 50px; height: .5em;"><div style="background-color: #7e7; width: {1}%; height: .5em;"></div></div>{0}</div>'
-
toUploadFormat
: HTML template to use for an item to be uploaded- default: '<div style="overflow: hidden; text-overflow: ellipsis; color: #666; font-style: italic; padding: .25em;">{0}</div>'
-
errorFormat
: HTML template to use for an error- default: '<div style="overflow: hidden; text-overflow: ellipsis; color: #000; padding: .25em;"><div style="float: right; color: #f00; margin-left: .25em;">Error</div>{0}</div>'
-
cancelledFormat
: HTML template to use for a cancelled item- default: '<div style=\"overflow: hidden; text-overflow: ellipsis; color: #666; font-style: italic; border-top: solid 1px #eee; padding-top: .25em; margin-top: .25em;\"><div style=\"float: right; color: #666; font-style: italic; margin-left: .25em;\">Cancelled</div>{0}</div>'
-
firstItemRemove
: HTML template to strip from the first item when removed (rarely necessary to modify)- default:
border-top: solid 1px #eee; padding-top: .25em; margin-top: .25em;"
- default:
-
contentTypeId
: The Guid ID of the content type into which this file will be stored.- default: null
-
applicationTypeId
: The Guid ID of the application type into which this file will be stored.- default: null
-
applicationId
: The Guid ID of the application into which this file will be stored.- default: null
-
type
: The type of file being uploaded (used for validation). Options are: 'Image'- default: null
Methods
val
Returns the list of uploaded files
var files = $('SELECTOR').glowMultiUpload('val');