SlickUpload

kw.FileList Class

Displays a list of files that have been selected for upload.

Members

kw.FileList (Object)
Constructs and returns the FileList represented by the specified settings object.

Setting Attributes

  • element (element) – The DOM element to use as a container for this FileList. If the id attribute isn't specified, it will be set to the id of this DOM element.
  • fileSelector (kw.FileSelector) – The FileSelector that selects files for this FileList. This can be either the actual FileSelector object, or the String id that the FileSelector was created with.
  • fileSizeFormatter (Function) – The function to use to format file sizes. Default value: kw.defaultFileSizeFormatter.
  • fileValidationMessageFormatter (Function) – The function to use to format file validation messages. Default value: kw.defaultFileValidationMessageFormatter.
  • id (String) – The unique id for this FileList. If the element attribute isn't specified, this must match a DOM id.
  • invalidExtensionMessage (String) – The message to display for files with an invalid extension. Default value: "Invalid file extension.".
  • invalidFileSizeMessage (String) – The message to display for files with an invalid size. Default value: "File is too large.".
  • templateElement (element) – The DOM element to use as a list item template. When files are added, this element will be cloned and appended to the FileList. Any child elements inside it with id or name attributes will be prefixed with the id of the kw.File that was added.
get_Element()
Returns the DOM element that is used as a container for this FileList.

Return Value

  • element – The the DOM element that is used as a container for this FileList.
get_FileSelector()
Returns the FileSelector that selects files for this FileList.

Return Value

  • kw.FileSelector – The FileSelector that selects files for this FileList.
get_FileSizeFormatter()
Returns the function to use to format file sizes.

Return Value

  • Function – The function to use to format file sizes.
get_FileValidationMessageFormatter()
Returns the function to use to format file validation messages.

Return Value

  • Function – The function to use to format file validation messages.
get_Id()
Returns the id of this FileList.

Return Value

  • String – The id of this FileList.
get_InvalidExtensionMessage()
Returns the message to display for files with an invalid extension.

Return Value

  • String – The message to display for files with an invalid extension.
get_InvalidFileSizeMessage()
Returns the message to display for files with an invalid size.

Return Value

  • String – The message to display for files with an invalid size.
get_TemplateElement()
Returns the DOM element that is used as a list item template. When files are added, this element will be cloned and appended to the FileList. Any child elements inside it with id or name attributes will be prefixed with the id of the kw.File that was added.

Return Value

  • element – The DOM element that is used as a list item template.