class sap.m.upload.UploadSet

Control sample: sap.m.upload.UploadSet
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/upload/UploadSet
Application Component: CA-UI5-SC

This control allows you to upload one or more files from your devices (desktop, tablet, or phone) and attach them to your application.
This control builds on the sap.m.UploadCollection control, providing better handling of headers and requests, unified behavior of instant and deferred uploads, as well as improved progress indication.


Constructor

Constructor for a new UploadSet.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.m.upload.UploadSet(sId?, mSettings?)
Param Type Default Value Description
sId? string

id for the new control, generated automatically if no id is given.

mSettings? object

Initial settings for the new control.


Properties

Name Type Default Value Description
fileTypes string[]

Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.

Visibility: public
httpRequestMethod sap.m.upload.UploaderHttpRequestMethod Post

HTTP request method chosen for file upload.

Since: 1.90.

Visibility: public
instantUpload boolean true

Defines whether the upload process should be triggered as soon as the file is added.
If set to false, no upload is triggered when a file is added.

Visibility: public
maxFileNameLength int

Maximum length of names of files to be uploaded.
If set to null or 0, any files can be uploaded, regardless of their names length.

Visibility: public
maxFileSize float

Size limit in megabytes for files to be uploaded.
If set to null or 0, files of any size can be uploaded.

Visibility: public
mediaTypes string[]

Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.

Visibility: public
noDataDescription string

Defines custom text for the 'No data' description label.

Visibility: public
noDataText string

Defines custom text for the 'No data' text label.

Visibility: public
showIcons boolean true

Defines whether file icons should be displayed.

Visibility: public
terminationEnabled boolean true

Defines whether it is allowed to terminate the upload process.

Visibility: public
uploadEnabled boolean true

Defines whether the upload action is allowed.

Visibility: public
uploadUrl string

URL where the uploaded files will be stored.

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
headerFields 0..n sap.ui.core.Item

Header fields to be included in the header section of an XHR request.

incompleteItems 0..n sap.m.upload.UploadSetItem

Items representing files yet to be uploaded.

items (default) 0..n sap.m.upload.UploadSetItem

Items representing files that have already been uploaded.

toolbar 0..1 sap.m.OverflowToolbar

Main toolbar of the UploadSet control.

uploader 0..1 sap.m.upload.Uploader

Defines the uploader to be used. If not specified, the default implementation is used.


Events Overview

Event Description
afterItemAdded

This event is fired when a new file is added to the set of items to be uploaded.

afterItemEdited

This event is fired after item edit is confirmed.

Since: 1.83.

afterItemRemoved

This event is fired after the item is removed on click of ok button in confirmation dialog.

Since: 1.83.

beforeItemAdded

This event is fired just before a new file is added to the set of items to be uploaded.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

beforeItemEdited

This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

beforeItemRemoved

This event is fired just before the confirmation dialog for 'Remove' action is displayed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

beforeUploadStarts

This event is fired right before the upload process begins.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

beforeUploadTermination

This event is fired right before the upload is terminated.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

fileNameLengthExceeded

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file name length restriction specified in the maxFileNameLength property.
  • When the file name length restriction changes, and the file to be uploaded fails to meet the new restriction.

fileSizeExceeded

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file size restriction specified in the maxFileSize property.
  • When the file size restriction changes, and the file to be uploaded fails to meet the new restriction.

fileTypeMismatch

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file type restriction (fileType property).
  • When the file type restriction changes, and the file to be uploaded fails to meet the new restriction.

mediaTypeMismatch

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the media type restriction specified in the mediaTypes property.
  • When the media type restriction changes, and the file to be uploaded fails to meet the new restriction.

selectionChanged

This event is fired simultaneously with the respective event in the inner sap.m.List control.

uploadCompleted

This event is fired right after the upload process is finished.

uploadTerminated

This event is fired right after the upload is terminated.

afterItemAdded

This event is fired when a new file is added to the set of items to be uploaded.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file that has just been added.

afterItemEdited

This event is fired after item edit is confirmed.

Since: 1.83.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The item edited.

afterItemRemoved

This event is fired after the item is removed on click of ok button in confirmation dialog.

Since: 1.83.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The item removed from the set of items to be uploaded.

beforeItemAdded

This event is fired just before a new file is added to the set of items to be uploaded.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file to be added to the set of items to be uploaded.

beforeItemEdited

This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The item to be edited.

beforeItemRemoved

This event is fired just before the confirmation dialog for 'Remove' action is displayed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The item to be removed from the set of items to be uploaded.

beforeUploadStarts

This event is fired right before the upload process begins.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file whose upload is just about to start.

beforeUploadTermination

This event is fired right before the upload is terminated.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file whose upload is about to be terminated.

fileNameLengthExceeded

This event is fired in either of the following cases:

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file that fails to meet the file name length restriction specified in the maxFileNameLength property.

fileSizeExceeded

This event is fired in either of the following cases:

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file that fails to meet the file size restriction specified in the maxFileSize property.

fileTypeMismatch

This event is fired in either of the following cases:

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file that fails to meet the file type restriction specified in the fileType property.

mediaTypeMismatch

This event is fired in either of the following cases:

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file that fails to meet the media type restriction specified in the mediaTypes property.

selectionChanged

This event is fired simultaneously with the respective event in the inner sap.m.List control.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
items sap.m.upload.UploadSetItem[]

Items whose selection status has just been changed.

uploadCompleted

This event is fired right after the upload process is finished.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file whose upload has just been completed.

uploadTerminated

This event is fired right after the upload is terminated.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
item sap.m.upload.UploadSetItem

The file whose upload has just been terminated.


Methods Overview

Method Description
addHeaderField

Adds some headerField to the aggregation headerFields.

addIncompleteItem

Adds some incompleteItem to the aggregation incompleteItems.

addItem

Adds some item to the aggregation items.

attachAfterItemAdded

Attaches event handler fnFunction to the afterItemAdded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired when a new file is added to the set of items to be uploaded.

attachAfterItemEdited

Attaches event handler fnFunction to the afterItemEdited event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired after item edit is confirmed.

attachAfterItemRemoved

Attaches event handler fnFunction to the afterItemRemoved event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired after the item is removed on click of ok button in confirmation dialog.

attachBeforeItemAdded

Attaches event handler fnFunction to the beforeItemAdded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired just before a new file is added to the set of items to be uploaded.

attachBeforeItemEdited

Attaches event handler fnFunction to the beforeItemEdited event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.

attachBeforeItemRemoved

Attaches event handler fnFunction to the beforeItemRemoved event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired just before the confirmation dialog for 'Remove' action is displayed.

attachBeforeUploadStarts

Attaches event handler fnFunction to the beforeUploadStarts event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right before the upload process begins.

attachBeforeUploadTermination

Attaches event handler fnFunction to the beforeUploadTermination event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right before the upload is terminated.

attachFileNameLengthExceeded

Attaches event handler fnFunction to the fileNameLengthExceeded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file name length restriction specified in the maxFileNameLength property.
  • When the file name length restriction changes, and the file to be uploaded fails to meet the new restriction.

attachFileSizeExceeded

Attaches event handler fnFunction to the fileSizeExceeded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file size restriction specified in the maxFileSize property.
  • When the file size restriction changes, and the file to be uploaded fails to meet the new restriction.

attachFileTypeMismatch

Attaches event handler fnFunction to the fileTypeMismatch event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the file type restriction (fileType property).
  • When the file type restriction changes, and the file to be uploaded fails to meet the new restriction.

attachMediaTypeMismatch

Attaches event handler fnFunction to the mediaTypeMismatch event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

  • When a file that is selected to be uploaded fails to meet the media type restriction specified in the mediaTypes property.
  • When the media type restriction changes, and the file to be uploaded fails to meet the new restriction.

attachSelectionChanged

Attaches event handler fnFunction to the selectionChanged event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired simultaneously with the respective event in the inner sap.m.List control.

attachUploadCompleted

Attaches event handler fnFunction to the uploadCompleted event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right after the upload process is finished.

attachUploadTerminated

Attaches event handler fnFunction to the uploadTerminated event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right after the upload is terminated.

destroyHeaderFields

Destroys all the headerFields in the aggregation headerFields.

destroyIncompleteItems

Destroys all the incompleteItems in the aggregation incompleteItems.

destroyItems

Destroys all the items in the aggregation items.

destroyToolbar

Destroys the toolbar in the aggregation toolbar.

destroyUploader

Destroys the uploader in the aggregation uploader.

detachAfterItemAdded

Detaches event handler fnFunction from the afterItemAdded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachAfterItemEdited

Detaches event handler fnFunction from the afterItemEdited event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachAfterItemRemoved

Detaches event handler fnFunction from the afterItemRemoved event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachBeforeItemAdded

Detaches event handler fnFunction from the beforeItemAdded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachBeforeItemEdited

Detaches event handler fnFunction from the beforeItemEdited event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachBeforeItemRemoved

Detaches event handler fnFunction from the beforeItemRemoved event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachBeforeUploadStarts

Detaches event handler fnFunction from the beforeUploadStarts event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachBeforeUploadTermination

Detaches event handler fnFunction from the beforeUploadTermination event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachFileNameLengthExceeded

Detaches event handler fnFunction from the fileNameLengthExceeded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachFileSizeExceeded

Detaches event handler fnFunction from the fileSizeExceeded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachFileTypeMismatch

Detaches event handler fnFunction from the fileTypeMismatch event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachMediaTypeMismatch

Detaches event handler fnFunction from the mediaTypeMismatch event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachSelectionChanged

Detaches event handler fnFunction from the selectionChanged event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachUploadCompleted

Detaches event handler fnFunction from the uploadCompleted event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

detachUploadTerminated

Detaches event handler fnFunction from the uploadTerminated event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

sap.m.upload.UploadSet.extend

Creates a new subclass of class sap.m.upload.UploadSet with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

fireAfterItemAdded

Fires event afterItemAdded to attached listeners.

fireAfterItemEdited

Fires event afterItemEdited to attached listeners.

fireAfterItemRemoved

Fires event afterItemRemoved to attached listeners.

fireBeforeItemAdded

Fires event beforeItemAdded to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireBeforeItemEdited

Fires event beforeItemEdited to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireBeforeItemRemoved

Fires event beforeItemRemoved to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireBeforeUploadStarts

Fires event beforeUploadStarts to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireBeforeUploadTermination

Fires event beforeUploadTermination to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireFileNameLengthExceeded

Fires event fileNameLengthExceeded to attached listeners.

fireFileSizeExceeded

Fires event fileSizeExceeded to attached listeners.

fireFileTypeMismatch

Fires event fileTypeMismatch to attached listeners.

fireMediaTypeMismatch

Fires event mediaTypeMismatch to attached listeners.

fireSelectionChanged

Fires event selectionChanged to attached listeners.

fireUploadCompleted

Fires event uploadCompleted to attached listeners.

fireUploadTerminated

Fires event uploadTerminated to attached listeners.

getDefaultFileUploader

Returns an instance of the default sap.ui.unified.FileUploader used for adding files using the operating system's open file dialog, so that it can be customized, for example made invisible or assigned a different icon.

getFileTypes

Gets current value of property fileTypes.

Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.

getHeaderFields

Gets content of aggregation headerFields.

Header fields to be included in the header section of an XHR request.

getHttpRequestMethod

Gets current value of property httpRequestMethod.

HTTP request method chosen for file upload.

Default value is Post.

getIncompleteItems

Gets content of aggregation incompleteItems.

Items representing files yet to be uploaded.

getInstantUpload

Gets current value of property instantUpload.

Defines whether the upload process should be triggered as soon as the file is added.
If set to false, no upload is triggered when a file is added.

Default value is true.

getItems

Gets content of aggregation items.

Items representing files that have already been uploaded.

getList

Provides access to the instance of the inner sap.m.List control, so that it can be customized.

getMaxFileNameLength

Gets current value of property maxFileNameLength.

Maximum length of names of files to be uploaded.
If set to null or 0, any files can be uploaded, regardless of their names length.

getMaxFileSize

Gets current value of property maxFileSize.

Size limit in megabytes for files to be uploaded.
If set to null or 0, files of any size can be uploaded.

getMediaTypes

Gets current value of property mediaTypes.

Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.

sap.m.upload.UploadSet.getMetadata

Returns a metadata object for class sap.m.upload.UploadSet.

getNoDataDescription

Gets current value of property noDataDescription.

Defines custom text for the 'No data' description label.

getNoDataText

Gets current value of property noDataText.

Defines custom text for the 'No data' text label.

getShowIcons

Gets current value of property showIcons.

Defines whether file icons should be displayed.

Default value is true.

getTerminationEnabled

Gets current value of property terminationEnabled.

Defines whether it is allowed to terminate the upload process.

Default value is true.

getToolbar

Gets content of aggregation toolbar.

Main toolbar of the UploadSet control.

getUploadEnabled

Gets current value of property uploadEnabled.

Defines whether the upload action is allowed.

Default value is true.

getUploader

Gets content of aggregation uploader.

Defines the uploader to be used. If not specified, the default implementation is used.

getUploadUrl

Gets current value of property uploadUrl.

URL where the uploaded files will be stored.

indexOfHeaderField

Checks for the provided sap.ui.core.Item in the aggregation headerFields. and returns its index if found or -1 otherwise.

indexOfIncompleteItem

Checks for the provided sap.m.upload.UploadSetItem in the aggregation incompleteItems. and returns its index if found or -1 otherwise.

indexOfItem

Checks for the provided sap.m.upload.UploadSetItem in the aggregation items. and returns its index if found or -1 otherwise.

insertHeaderField

Inserts a headerField into the aggregation headerFields.

insertIncompleteItem

Inserts a incompleteItem into the aggregation incompleteItems.

insertItem

Inserts a item into the aggregation items.

registerUploaderEvents

Attaches all necessary handlers to the given uploader instance, so that the progress and status of the upload can be displayed and monitored.

removeAllHeaderFields

Removes all the controls from the aggregation headerFields.

Additionally, it unregisters them from the hosting UIArea.

removeAllIncompleteItems

Removes all the controls from the aggregation incompleteItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeHeaderField

Removes a headerField from the aggregation headerFields.

removeIncompleteItem

Removes a incompleteItem from the aggregation incompleteItems.

removeItem

Removes a item from the aggregation items.

setFileTypes

Sets a new value for property fileTypes.

Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

setHttpRequestMethod

Sets a new value for property httpRequestMethod.

HTTP request method chosen for file upload.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Post.

setInstantUpload

Sets a new value for property instantUpload.

Defines whether the upload process should be triggered as soon as the file is added.
If set to false, no upload is triggered when a file is added.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setMaxFileNameLength

Sets a new value for property maxFileNameLength.

Maximum length of names of files to be uploaded.
If set to null or 0, any files can be uploaded, regardless of their names length.

When called with a value of null or undefined, the default value of the property will be restored.

setMaxFileSize

Sets a new value for property maxFileSize.

Size limit in megabytes for files to be uploaded.
If set to null or 0, files of any size can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

setMediaTypes

Sets a new value for property mediaTypes.

Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

setNoDataDescription

Sets a new value for property noDataDescription.

Defines custom text for the 'No data' description label.

When called with a value of null or undefined, the default value of the property will be restored.

setNoDataText

Sets a new value for property noDataText.

Defines custom text for the 'No data' text label.

When called with a value of null or undefined, the default value of the property will be restored.

setShowIcons

Sets a new value for property showIcons.

Defines whether file icons should be displayed.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setTerminationEnabled

Sets a new value for property terminationEnabled.

Defines whether it is allowed to terminate the upload process.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setToolbar

Sets the aggregated toolbar.

setUploadEnabled

Sets a new value for property uploadEnabled.

Defines whether the upload action is allowed.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setUploader

Sets the aggregated uploader.

setUploadUrl

Sets a new value for property uploadUrl.

URL where the uploaded files will be stored.

When called with a value of null or undefined, the default value of the property will be restored.

upload

Starts uploading all files that comply with the restrictions defined in the fileTypes, maxFileNameLength, maxFileSize, and mediaTypes properties.
This method works only when the uploadEnabled property is set to true.

uploadItem

Starts uploading the file if it complies with the restrictions defined in the fileTypes, maxFileNameLength, maxFileSize, and mediaTypes properties.
This method works only when the uploadEnabled property is set to true.

addHeaderField

Adds some headerField to the aggregation headerFields.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField to add; if empty, nothing is inserted

addIncompleteItem

Adds some incompleteItem to the aggregation incompleteItems.

Param Type DefaultValue Description
oIncompleteItem sap.m.upload.UploadSetItem

The incompleteItem to add; if empty, nothing is inserted

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.m.upload.UploadSetItem

The item to add; if empty, nothing is inserted

attachAfterItemAdded

Attaches event handler fnFunction to the afterItemAdded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired when a new file is added to the set of items to be uploaded.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachAfterItemEdited

Attaches event handler fnFunction to the afterItemEdited event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired after item edit is confirmed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachAfterItemRemoved

Attaches event handler fnFunction to the afterItemRemoved event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired after the item is removed on click of ok button in confirmation dialog.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachBeforeItemAdded

Attaches event handler fnFunction to the beforeItemAdded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired just before a new file is added to the set of items to be uploaded.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachBeforeItemEdited

Attaches event handler fnFunction to the beforeItemEdited event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired when the edit button is clicked for an item and no other item is being edited at the same time.
If there is another item that has unsaved changes, the editing of the clicked item cannot be started.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachBeforeItemRemoved

Attaches event handler fnFunction to the beforeItemRemoved event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired just before the confirmation dialog for 'Remove' action is displayed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachBeforeUploadStarts

Attaches event handler fnFunction to the beforeUploadStarts event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right before the upload process begins.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachBeforeUploadTermination

Attaches event handler fnFunction to the beforeUploadTermination event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right before the upload is terminated.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachFileNameLengthExceeded

Attaches event handler fnFunction to the fileNameLengthExceeded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachFileSizeExceeded

Attaches event handler fnFunction to the fileSizeExceeded event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachFileTypeMismatch

Attaches event handler fnFunction to the fileTypeMismatch event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachMediaTypeMismatch

Attaches event handler fnFunction to the mediaTypeMismatch event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired in either of the following cases:

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachSelectionChanged

Attaches event handler fnFunction to the selectionChanged event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired simultaneously with the respective event in the inner sap.m.List control.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachUploadCompleted

Attaches event handler fnFunction to the uploadCompleted event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right after the upload process is finished.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

attachUploadTerminated

Attaches event handler fnFunction to the uploadTerminated event of this sap.m.upload.UploadSet.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.upload.UploadSet itself.

This event is fired right after the upload is terminated.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.upload.UploadSet itself

destroyHeaderFields

Destroys all the headerFields in the aggregation headerFields.

destroyIncompleteItems

Destroys all the incompleteItems in the aggregation incompleteItems.

destroyItems

Destroys all the items in the aggregation items.

destroyToolbar

Destroys the toolbar in the aggregation toolbar.

destroyUploader

Destroys the uploader in the aggregation uploader.

detachAfterItemAdded

Detaches event handler fnFunction from the afterItemAdded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachAfterItemEdited

Detaches event handler fnFunction from the afterItemEdited event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachAfterItemRemoved

Detaches event handler fnFunction from the afterItemRemoved event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBeforeItemAdded

Detaches event handler fnFunction from the beforeItemAdded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBeforeItemEdited

Detaches event handler fnFunction from the beforeItemEdited event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBeforeItemRemoved

Detaches event handler fnFunction from the beforeItemRemoved event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBeforeUploadStarts

Detaches event handler fnFunction from the beforeUploadStarts event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachBeforeUploadTermination

Detaches event handler fnFunction from the beforeUploadTermination event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFileNameLengthExceeded

Detaches event handler fnFunction from the fileNameLengthExceeded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFileSizeExceeded

Detaches event handler fnFunction from the fileSizeExceeded event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFileTypeMismatch

Detaches event handler fnFunction from the fileTypeMismatch event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachMediaTypeMismatch

Detaches event handler fnFunction from the mediaTypeMismatch event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachSelectionChanged

Detaches event handler fnFunction from the selectionChanged event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachUploadCompleted

Detaches event handler fnFunction from the uploadCompleted event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachUploadTerminated

Detaches event handler fnFunction from the uploadTerminated event of this sap.m.upload.UploadSet.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.upload.UploadSet.extend

Creates a new subclass of class sap.m.upload.UploadSet with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

fireAfterItemAdded

Fires event afterItemAdded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file that has just been added.

fireAfterItemEdited

Fires event afterItemEdited to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The item edited.

fireAfterItemRemoved

Fires event afterItemRemoved to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The item removed from the set of items to be uploaded.

fireBeforeItemAdded

Fires event beforeItemAdded to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file to be added to the set of items to be uploaded.

fireBeforeItemEdited

Fires event beforeItemEdited to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The item to be edited.

fireBeforeItemRemoved

Fires event beforeItemRemoved to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The item to be removed from the set of items to be uploaded.

fireBeforeUploadStarts

Fires event beforeUploadStarts to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file whose upload is just about to start.

fireBeforeUploadTermination

Fires event beforeUploadTermination to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file whose upload is about to be terminated.

fireFileNameLengthExceeded

Fires event fileNameLengthExceeded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file that fails to meet the file name length restriction specified in the maxFileNameLength property.

fireFileSizeExceeded

Fires event fileSizeExceeded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file that fails to meet the file size restriction specified in the maxFileSize property.

fireFileTypeMismatch

Fires event fileTypeMismatch to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file that fails to meet the file type restriction specified in the fileType property.

fireMediaTypeMismatch

Fires event mediaTypeMismatch to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file that fails to meet the media type restriction specified in the mediaTypes property.

fireSelectionChanged

Fires event selectionChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

items sap.m.upload.UploadSetItem[]

Items whose selection status has just been changed.

fireUploadCompleted

Fires event uploadCompleted to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file whose upload has just been completed.

fireUploadTerminated

Fires event uploadTerminated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.m.upload.UploadSetItem

The file whose upload has just been terminated.

getDefaultFileUploader

Returns an instance of the default sap.ui.unified.FileUploader used for adding files using the operating system's open file dialog, so that it can be customized, for example made invisible or assigned a different icon.

getFileTypes

Gets current value of property fileTypes.

Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.

getHeaderFields

Gets content of aggregation headerFields.

Header fields to be included in the header section of an XHR request.

getHttpRequestMethod

Gets current value of property httpRequestMethod.

HTTP request method chosen for file upload.

Default value is Post.

getIncompleteItems

Gets content of aggregation incompleteItems.

Items representing files yet to be uploaded.

getInstantUpload

Gets current value of property instantUpload.

Defines whether the upload process should be triggered as soon as the file is added.
If set to false, no upload is triggered when a file is added.

Default value is true.

getItems

Gets content of aggregation items.

Items representing files that have already been uploaded.

getList

Provides access to the instance of the inner sap.m.List control, so that it can be customized.

getMaxFileNameLength

Gets current value of property maxFileNameLength.

Maximum length of names of files to be uploaded.
If set to null or 0, any files can be uploaded, regardless of their names length.

getMaxFileSize

Gets current value of property maxFileSize.

Size limit in megabytes for files to be uploaded.
If set to null or 0, files of any size can be uploaded.

getMediaTypes

Gets current value of property mediaTypes.

Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.

sap.m.upload.UploadSet.getMetadata

Returns a metadata object for class sap.m.upload.UploadSet.

getNoDataDescription

Gets current value of property noDataDescription.

Defines custom text for the 'No data' description label.

getNoDataText

Gets current value of property noDataText.

Defines custom text for the 'No data' text label.

getShowIcons

Gets current value of property showIcons.

Defines whether file icons should be displayed.

Default value is true.

getTerminationEnabled

Gets current value of property terminationEnabled.

Defines whether it is allowed to terminate the upload process.

Default value is true.

getToolbar

Gets content of aggregation toolbar.

Main toolbar of the UploadSet control.

getUploadEnabled

Gets current value of property uploadEnabled.

Defines whether the upload action is allowed.

Default value is true.

getUploader

Gets content of aggregation uploader.

Defines the uploader to be used. If not specified, the default implementation is used.

getUploadUrl

Gets current value of property uploadUrl.

URL where the uploaded files will be stored.

indexOfHeaderField

Checks for the provided sap.ui.core.Item in the aggregation headerFields. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField whose index is looked for

indexOfIncompleteItem

Checks for the provided sap.m.upload.UploadSetItem in the aggregation incompleteItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oIncompleteItem sap.m.upload.UploadSetItem

The incompleteItem whose index is looked for

indexOfItem

Checks for the provided sap.m.upload.UploadSetItem in the aggregation items. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oItem sap.m.upload.UploadSetItem

The item whose index is looked for

insertHeaderField

Inserts a headerField into the aggregation headerFields.

Param Type DefaultValue Description
oHeaderField sap.ui.core.Item

The headerField to insert; if empty, nothing is inserted

iIndex int

The 0-based index the headerField should be inserted at; for a negative value of iIndex, the headerField is inserted at position 0; for a value greater than the current size of the aggregation, the headerField is inserted at the last position

insertIncompleteItem

Inserts a incompleteItem into the aggregation incompleteItems.

Param Type DefaultValue Description
oIncompleteItem sap.m.upload.UploadSetItem

The incompleteItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the incompleteItem should be inserted at; for a negative value of iIndex, the incompleteItem is inserted at position 0; for a value greater than the current size of the aggregation, the incompleteItem is inserted at the last position

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.m.upload.UploadSetItem

The item to insert; if empty, nothing is inserted

iIndex int

The 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position

registerUploaderEvents

Attaches all necessary handlers to the given uploader instance, so that the progress and status of the upload can be displayed and monitored.

Param Type DefaultValue Description
oUploader sap.m.upload.Uploader

Instance of sap.m.upload.Uploader to which the default request handlers are attached.

removeAllHeaderFields

Removes all the controls from the aggregation headerFields.

Additionally, it unregisters them from the hosting UIArea.

removeAllIncompleteItems

Removes all the controls from the aggregation incompleteItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeHeaderField

Removes a headerField from the aggregation headerFields.

Param Type DefaultValue Description
vHeaderField int string sap.ui.core.Item

The headerField to remove or its index or id

removeIncompleteItem

Removes a incompleteItem from the aggregation incompleteItems.

Param Type DefaultValue Description
vIncompleteItem int string sap.m.upload.UploadSetItem

The incompleteItem to remove or its index or id

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.m.upload.UploadSetItem

The item to remove or its index or id

setFileTypes

Sets a new value for property fileTypes.

Allowed file types for files to be uploaded.
If this property is not set, any file can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sFileTypes string[]

New value for property fileTypes

setHttpRequestMethod

Sets a new value for property httpRequestMethod.

HTTP request method chosen for file upload.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is Post.

Param Type DefaultValue Description
sHttpRequestMethod sap.m.upload.UploaderHttpRequestMethod Post

New value for property httpRequestMethod

setInstantUpload

Sets a new value for property instantUpload.

Defines whether the upload process should be triggered as soon as the file is added.
If set to false, no upload is triggered when a file is added.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bInstantUpload boolean true

New value for property instantUpload

setMaxFileNameLength

Sets a new value for property maxFileNameLength.

Maximum length of names of files to be uploaded.
If set to null or 0, any files can be uploaded, regardless of their names length.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
iMaxFileNameLength int

New value for property maxFileNameLength

setMaxFileSize

Sets a new value for property maxFileSize.

Size limit in megabytes for files to be uploaded.
If set to null or 0, files of any size can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
fMaxFileSize float

New value for property maxFileSize

setMediaTypes

Sets a new value for property mediaTypes.

Allowed media types for files to be uploaded.
If this property is not set, any file can be uploaded.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sMediaTypes string[]

New value for property mediaTypes

setNoDataDescription

Sets a new value for property noDataDescription.

Defines custom text for the 'No data' description label.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sNoDataDescription string

New value for property noDataDescription

setNoDataText

Sets a new value for property noDataText.

Defines custom text for the 'No data' text label.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sNoDataText string

New value for property noDataText

setShowIcons

Sets a new value for property showIcons.

Defines whether file icons should be displayed.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bShowIcons boolean true

New value for property showIcons

setTerminationEnabled

Sets a new value for property terminationEnabled.

Defines whether it is allowed to terminate the upload process.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bTerminationEnabled boolean true

New value for property terminationEnabled

setToolbar

Sets the aggregated toolbar.

Param Type DefaultValue Description
oToolbar sap.m.OverflowToolbar

The toolbar to set

setUploadEnabled

Sets a new value for property uploadEnabled.

Defines whether the upload action is allowed.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bUploadEnabled boolean true

New value for property uploadEnabled

setUploader

Sets the aggregated uploader.

Param Type DefaultValue Description
oUploader sap.m.upload.Uploader

The uploader to set

setUploadUrl

Sets a new value for property uploadUrl.

URL where the uploaded files will be stored.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sUploadUrl string

New value for property uploadUrl

upload

Starts uploading all files that comply with the restrictions defined in the fileTypes, maxFileNameLength, maxFileSize, and mediaTypes properties.
This method works only when the uploadEnabled property is set to true.

uploadItem

Starts uploading the file if it complies with the restrictions defined in the fileTypes, maxFileNameLength, maxFileSize, and mediaTypes properties.
This method works only when the uploadEnabled property is set to true.

Param Type DefaultValue Description
oItem object

File to upload.