Class sap.m.UploadCollectionModule: sap/m/UploadCollection

extends Control

This control allows you to upload single or multiple files from your devices (desktop, tablet or phone) and attach them to the application.

The consuming application needs to take into account that the consistency checks of the model during the upload of the file need to be performed, for example, if the user is editing or deleting a file.


Since: 1.26.
Constructor Summary
new sap.m.UploadCollection(sId?, mSettings?)Constructor for a new UploadCollection.
Event Summary
beforeUploadStarts(oControlEvent)The event is triggered before the actual upload starts.
change(oControlEvent)The event is triggered when files are selected in the FileUploader dialog.
fileDeleted(oControlEvent)The event is triggered when an uploaded attachment is selected and the Delete button is pressed.
filenameLengthExceed(oControlEvent)The event is triggered when the name of a chosen file is longer than the value specified with the maximumFilenameLength property (only if provided by the application).
fileRenamed(oControlEvent)The event is triggered when the file name is changed.
fileSizeExceed(oControlEvent)The event is triggered when the file size of an uploaded file is exceeded (only if the maxFileSize property was provided by the application).
selectionChange(oControlEvent)Fires when selection is changed via user interaction inside the control.
typeMissmatch(oControlEvent)The event is triggered when the file type or the MIME type don't match the permitted types (only if the fileType property or the mimeType property are provided by the application).
uploadComplete(oControlEvent)The event is triggered as soon as the upload request is completed.
uploadTerminated(oControlEvent)The event is triggered as soon as the upload request was terminated by the user.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.UploadCollection.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.UploadCollection with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.UploadCollection.getMetadata()Returns a metadata object for class sap.m.UploadCollection.
addHeaderParameter(oHeaderParameter)Adds some headerParameter to the aggregation headerParameters.
addItem(oItem)Adds some item to the aggregation items.
addParameter(oParameter)Adds some parameter to the aggregation parameters.
attachBeforeUploadStarts(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeUploadStarts event of this sap.m.UploadCollection.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.m.UploadCollection.
attachFileDeleted(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileDeleted event of this sap.m.UploadCollection.
attachFilenameLengthExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the filenameLengthExceed event of this sap.m.UploadCollection.
attachFileRenamed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileRenamed event of this sap.m.UploadCollection.
attachFileSizeExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileSizeExceed event of this sap.m.UploadCollection.
attachSelectionChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the selectionChange event of this sap.m.UploadCollection.
attachTypeMissmatch(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the typeMissmatch event of this sap.m.UploadCollection.
attachUploadComplete(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadComplete event of this sap.m.UploadCollection.
attachUploadTerminated(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadTerminated event of this sap.m.UploadCollection.
bindItems(oBindingInfo)Binds aggregation items to model data.
destroyHeaderParameters()Destroys all the headerParameters in the aggregation headerParameters.
destroyItems()Destroys all the items in the aggregation items.
destroyParameters()Destroys all the parameters in the aggregation parameters.
destroyToolbar()Destroys the toolbar in the aggregation toolbar.
detachBeforeUploadStarts(fnFunction, oListener)Detaches event handler fnFunction from the beforeUploadStarts event of this sap.m.UploadCollection.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.m.UploadCollection.
detachFileDeleted(fnFunction, oListener)Detaches event handler fnFunction from the fileDeleted event of this sap.m.UploadCollection.
detachFilenameLengthExceed(fnFunction, oListener)Detaches event handler fnFunction from the filenameLengthExceed event of this sap.m.UploadCollection.
detachFileRenamed(fnFunction, oListener)Detaches event handler fnFunction from the fileRenamed event of this sap.m.UploadCollection.
detachFileSizeExceed(fnFunction, oListener)Detaches event handler fnFunction from the fileSizeExceed event of this sap.m.UploadCollection.
detachSelectionChange(fnFunction, oListener)Detaches event handler fnFunction from the selectionChange event of this sap.m.UploadCollection.
detachTypeMissmatch(fnFunction, oListener)Detaches event handler fnFunction from the typeMissmatch event of this sap.m.UploadCollection.
detachUploadComplete(fnFunction, oListener)Detaches event handler fnFunction from the uploadComplete event of this sap.m.UploadCollection.
detachUploadTerminated(fnFunction, oListener)Detaches event handler fnFunction from the uploadTerminated event of this sap.m.UploadCollection.
downloadItem(uploadCollectionItem, askForLocation)Downloads the given item.
fireBeforeUploadStarts(mArguments?)Fires event beforeUploadStarts to attached listeners.
fireChange(mArguments?)Fires event change to attached listeners.
fireFileDeleted(mArguments?)Fires event fileDeleted to attached listeners.
fireFilenameLengthExceed(mArguments?)Fires event filenameLengthExceed to attached listeners.
fireFileRenamed(mArguments?)Fires event fileRenamed to attached listeners.
fireFileSizeExceed(mArguments?)Fires event fileSizeExceed to attached listeners.
fireSelectionChange(mArguments?)Fires event selectionChange to attached listeners.
fireTypeMissmatch(mArguments?)Fires event typeMissmatch to attached listeners.
fireUploadComplete(mArguments?)Fires event uploadComplete to attached listeners.
fireUploadTerminated(mArguments?)Fires event uploadTerminated to attached listeners.
getFileType()Gets current value of property fileType.
getHeaderParameters()Gets content of aggregation headerParameters.
getInstantUpload()Gets current value of property instantUpload.
getItems()Gets content of aggregation items.
getMaximumFilenameLength()Gets current value of property maximumFilenameLength.
getMaximumFileSize()Gets current value of property maximumFileSize.
getMimeType()Gets current value of property mimeType.
getMode()Gets current value of property mode.
getMultiple()Gets current value of property multiple.
getNoDataText()Gets current value of property noDataText.
getNumberOfAttachmentsText()Gets current value of property numberOfAttachmentsText.
getParameters()Gets content of aggregation parameters.
getSameFilenameAllowed()Gets current value of property sameFilenameAllowed.
getSelectedItem()Returns selected UploadCollectionItem.
getSelectedItems()Returns an array containing the selected UploadCollectionItems.
getShowSeparators()Gets current value of property showSeparators.
getToolbar()Gets content of aggregation toolbar.
getUploadEnabled()Gets current value of property uploadEnabled.
getUploadUrl()Gets current value of property uploadUrl.
indexOfHeaderParameter(oHeaderParameter)Checks for the provided sap.m.UploadCollectionParameter in the aggregation headerParameters.
indexOfItem(oItem)Checks for the provided sap.m.UploadCollectionItem in the aggregation items.
indexOfParameter(oParameter)Checks for the provided sap.m.UploadCollectionParameter in the aggregation parameters.
insertHeaderParameter(oHeaderParameter, iIndex)Inserts a headerParameter into the aggregation headerParameters.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
insertParameter(oParameter, iIndex)Inserts a parameter into the aggregation parameters.
openFileDialog(item)Opens the FileUploader dialog.
removeAllHeaderParameters()Removes all the controls from the aggregation headerParameters.
removeAllItems()Removes all the controls from the aggregation items.
removeAllParameters()Removes all the controls from the aggregation parameters.
removeHeaderParameter(vHeaderParameter)Removes a headerParameter from the aggregation headerParameters.
removeItem(vItem)Removes a item from the aggregation items.
removeParameter(vParameter)Removes a parameter from the aggregation parameters.
selectAll()Select all items in "MultiSelection" mode.
setFileType(sFileType)Sets a new value for property fileType.
setInstantUpload(bInstantUpload)Sets a new value for property instantUpload.
setMaximumFilenameLength(iMaximumFilenameLength)Sets a new value for property maximumFilenameLength.
setMaximumFileSize(fMaximumFileSize)Sets a new value for property maximumFileSize.
setMimeType(sMimeType)Sets a new value for property mimeType.
setMode(sMode)Sets a new value for property mode.
setMultiple(bMultiple)Sets a new value for property multiple.
setNoDataText(sNoDataText)Sets a new value for property noDataText.
setNumberOfAttachmentsText(sNumberOfAttachmentsText)Sets a new value for property numberOfAttachmentsText.
setSameFilenameAllowed(bSameFilenameAllowed)Sets a new value for property sameFilenameAllowed.
setSelectedItem(uploadCollectionItem, select)Selects or deselects the given list item.
setSelectedItemById(id, select)Sets a UploadCollectionItem to be selected by id.
setShowSeparators(sShowSeparators)Sets a new value for property showSeparators.
setToolbar(oToolbar)Sets the aggregated toolbar.
setUploadEnabled(bUploadEnabled)Sets a new value for property uploadEnabled.
setUploadUrl(sUploadUrl)Sets a new value for property uploadUrl.
unbindItems()Unbinds aggregation items from model data.
upload()Starts the upload for all selected files.
Constructor Detail
new sap.m.UploadCollection(sId?, mSettings?)
Constructor for a new UploadCollection.

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

The supported settings are:

  • Properties
  • Aggregations
  • Events
    • change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • fileDeleted : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • filenameLengthExceed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • fileRenamed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • fileSizeExceed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • typeMissmatch : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • uploadComplete : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • uploadTerminated : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • beforeUploadStarts : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • selectionChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
beforeUploadStarts(oControlEvent)
The event is triggered before the actual upload starts. An event is fired per file. All the necessary header parameters should be set here.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName Specifies the name of the file to be uploaded.
{function}oControlEvent.getParameters.addHeaderParameter Adds a header parameter to the file that will be uploaded.
{function}oControlEvent.getParameters.getHeaderParameter Returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
change(oControlEvent)
The event is triggered when files are selected in the FileUploader dialog. Applications can set parameters and headerParameters which will be dispatched to the embedded FileUploader control. Limitation: parameters and headerParameters are not supported by Internet Explorer 9.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
{object[]}oControlEvent.getParameters.files A FileList of individually selected files from the underlying system. See www.w3.org for the FileList Interface definition. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
fileDeleted(oControlEvent)
The event is triggered when an uploaded attachment is selected and the Delete button is pressed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
{sap.m.UploadCollectionItem}oControlEvent.getParameters.item An item to be deleted from the collection. Since version 1.28.0.
filenameLengthExceed(oControlEvent)
The event is triggered when the name of a chosen file is longer than the value specified with the maximumFilenameLength property (only if provided by the application).
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
{object[]}oControlEvent.getParameters.files A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
fileRenamed(oControlEvent)
The event is triggered when the file name is changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
{string}oControlEvent.getParameters.fileName The new file name. This parameter is deprecated since version 1.28.0, use parameter item instead.
{sap.m.UploadCollectionItem}oControlEvent.getParameters.item The renamed UI element as a UploadCollectionItem. Since version 1.28.0.
fileSizeExceed(oControlEvent)
The event is triggered when the file size of an uploaded file is exceeded (only if the maxFileSize property was provided by the application). This event is not supported by Internet Explorer 9.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
{string}oControlEvent.getParameters.fileSize The size in MB of a file to be uploaded. This parameter is deprecated since version 1.28.0, use parameter files instead.
{object[]}oControlEvent.getParameters.files A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
selectionChange(oControlEvent)
Fires when selection is changed via user interaction inside the control.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.m.UploadCollectionItem}oControlEvent.getParameters.selectedItem The item whose selection has changed. In MultiSelect mode, only the selected item upmost is returned. This parameter can be used for single-selection modes.
{sap.m.UploadCollectionItem[]}oControlEvent.getParameters.selectedItems Array of items whose selection has changed. This parameter can be used for MultiSelect mode.
{boolean}oControlEvent.getParameters.selected Indicates whether the listItem parameter is selected or not.
Since:
1.36.0
typeMissmatch(oControlEvent)
The event is triggered when the file type or the MIME type don't match the permitted types (only if the fileType property or the mimeType property are provided by the application).
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.documentId An unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
{string}oControlEvent.getParameters.fileType File type. This parameter is deprecated since version 1.28.0, use parameter files instead.
{string}oControlEvent.getParameters.mimeType MIME type. This parameter is deprecated since version 1.28.0, use parameter files instead.
{object[]}oControlEvent.getParameters.files A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file. Since version 1.28.0.
uploadComplete(oControlEvent)
The event is triggered as soon as the upload request is completed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.readyStateXHR Ready state XHR. This parameter is deprecated since version 1.28.0., use parameter files instead.
{string}oControlEvent.getParameters.response Response of the completed upload request. This parameter is deprecated since version 1.28.0., use parameter files instead.
{string}oControlEvent.getParameters.status Status Code of the completed upload event. This parameter is deprecated since version 1.28.0., use parameter files instead.
{object[]}oControlEvent.getParameters.files A list of uploaded files. Each entry contains the following members. fileName : The name of a file to be uploaded. response : Response message which comes from the server. On the server side, this response has to be put within the 'body' tags of the response document of the iFrame. It can consist of a return code and an optional message. This does not work in cross-domain scenarios. responseRaw : HTTP-Response which comes from the server. This property is not supported by Internet Explorer Versions lower than 9. status : Status of the XHR request. This property is not supported by Internet Explorer 9 and lower. headers : HTTP-Response-Headers which come from the server. Provided as a JSON-map, i.e. each header-field is reflected by a property in the header-object, with the property value reflecting the header-field's content. This property is not supported by Internet Explorer 9 and lower. Since version 1.28.0.
uploadTerminated(oControlEvent)
The event is triggered as soon as the upload request was terminated by the user.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName Specifies the name of the file of which the upload is to be terminated.
{function}oControlEvent.getParameters.getHeaderParameter This callback function returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Method Detail
sap.m.UploadCollection.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.UploadCollection 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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.m.UploadCollection.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.UploadCollection.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addHeaderParameter(oHeaderParameter): sap.m.UploadCollection
Adds some headerParameter to the aggregation headerParameters.
Parameters:
{sap.m.UploadCollectionParameter}oHeaderParameter the headerParameter to add; if empty, nothing is inserted
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
addItem(oItem): sap.m.UploadCollection
Adds some item to the aggregation items.
Parameters:
{sap.m.UploadCollectionItem}oItem the item to add; if empty, nothing is inserted
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
addParameter(oParameter): sap.m.UploadCollection
Adds some parameter to the aggregation parameters.
Parameters:
{sap.m.UploadCollectionParameter}oParameter the parameter to add; if empty, nothing is inserted
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachBeforeUploadStarts(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the beforeUploadStarts event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered before the actual upload starts. An event is fired per file. All the necessary header parameters should be set here.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachChange(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the change event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when files are selected in the FileUploader dialog. Applications can set parameters and headerParameters which will be dispatched to the embedded FileUploader control. Limitation: parameters and headerParameters are not supported by Internet Explorer 9.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachFileDeleted(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the fileDeleted event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when an uploaded attachment is selected and the Delete button is pressed.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachFilenameLengthExceed(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the filenameLengthExceed event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when the name of a chosen file is longer than the value specified with the maximumFilenameLength property (only if provided by the application).

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachFileRenamed(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the fileRenamed event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when the file name is changed.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachFileSizeExceed(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the fileSizeExceed event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when the file size of an uploaded file is exceeded (only if the maxFileSize property was provided by the application). This event is not supported by Internet Explorer 9.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachSelectionChange(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the selectionChange event of this sap.m.UploadCollection.

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.UploadCollection itself.

Fires when selection is changed via user interaction inside the control.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Since:
1.36.0
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachTypeMissmatch(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the typeMissmatch event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered when the file type or the MIME type don't match the permitted types (only if the fileType property or the mimeType property are provided by the application).

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachUploadComplete(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the uploadComplete event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered as soon as the upload request is completed.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
attachUploadTerminated(oData?, fnFunction, oListener?): sap.m.UploadCollection
Attaches event handler fnFunction to the uploadTerminated event of this sap.m.UploadCollection.

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.UploadCollection itself.

The event is triggered as soon as the upload request was terminated by the user.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.UploadCollection itself
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
bindItems(oBindingInfo): sap.m.UploadCollection
Binds aggregation items to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
destroyHeaderParameters(): sap.m.UploadCollection
Destroys all the headerParameters in the aggregation headerParameters.
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
destroyItems(): sap.m.UploadCollection
Destroys all the items in the aggregation items.
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
destroyParameters(): sap.m.UploadCollection
Destroys all the parameters in the aggregation parameters.
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
destroyToolbar(): sap.m.UploadCollection
Destroys the toolbar in the aggregation toolbar.
Since:
1.34
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachBeforeUploadStarts(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the beforeUploadStarts event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachChange(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the change event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachFileDeleted(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the fileDeleted event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachFilenameLengthExceed(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the filenameLengthExceed event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachFileRenamed(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the fileRenamed event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachFileSizeExceed(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the fileSizeExceed event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachSelectionChange(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the selectionChange event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.36.0
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachTypeMissmatch(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the typeMissmatch event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachUploadComplete(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the uploadComplete event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
detachUploadTerminated(fnFunction, oListener): sap.m.UploadCollection
Detaches event handler fnFunction from the uploadTerminated event of this sap.m.UploadCollection.

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

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
downloadItem(uploadCollectionItem, askForLocation): boolean
Downloads the given item. This function delegates to {sap.m.UploadCollectionItem.download}.
Parameters:
{sap.m.UploadCollectionItem}uploadCollectionItem The item to download. This parameter is mandatory.
{boolean}askForLocation Decides whether to ask for a location to download or not.
Since:
1.36.0
Returns:
{boolean} True if the download has started successfully. False if the download couldn't be started.
fireBeforeUploadStarts(mArguments?): sap.m.UploadCollection
Fires event beforeUploadStarts to attached listeners.

Expects the following event parameters:

  • fileName of type stringSpecifies the name of the file to be uploaded.
  • addHeaderParameter of type functionAdds a header parameter to the file that will be uploaded.
  • getHeaderParameter of type functionReturns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireChange(mArguments?): sap.m.UploadCollection
Fires event change to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • files of type object[]A FileList of individually selected files from the underlying system. See www.w3.org for the FileList Interface definition. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireFileDeleted(mArguments?): sap.m.UploadCollection
Fires event fileDeleted to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
  • item of type sap.m.UploadCollectionItemAn item to be deleted from the collection. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireFilenameLengthExceed(mArguments?): sap.m.UploadCollection
Fires event filenameLengthExceed to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • files of type object[]A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireFileRenamed(mArguments?): sap.m.UploadCollection
Fires event fileRenamed to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter item instead.
  • fileName of type stringThe new file name. This parameter is deprecated since version 1.28.0, use parameter item instead.
  • item of type sap.m.UploadCollectionItemThe renamed UI element as a UploadCollectionItem. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireFileSizeExceed(mArguments?): sap.m.UploadCollection
Fires event fileSizeExceed to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • fileSize of type stringThe size in MB of a file to be uploaded. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • files of type object[]A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file with property file.name. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireSelectionChange(mArguments?): sap.m.UploadCollection
Fires event selectionChange to attached listeners.

Expects the following event parameters:

  • selectedItem of type sap.m.UploadCollectionItemThe item whose selection has changed. In MultiSelect mode, only the selected item upmost is returned. This parameter can be used for single-selection modes.
  • selectedItems of type sap.m.UploadCollectionItem[]Array of items whose selection has changed. This parameter can be used for MultiSelect mode.
  • selected of type booleanIndicates whether the listItem parameter is selected or not.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.36.0
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireTypeMissmatch(mArguments?): sap.m.UploadCollection
Fires event typeMissmatch to attached listeners.

Expects the following event parameters:

  • documentId of type stringAn unique Id of the attached document. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • fileType of type stringFile type. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • mimeType of type stringMIME type. This parameter is deprecated since version 1.28.0, use parameter files instead.
  • files of type object[]A FileList of individually selected files from the underlying system. Limitation: Internet Explorer 9 supports only single file. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireUploadComplete(mArguments?): sap.m.UploadCollection
Fires event uploadComplete to attached listeners.

Expects the following event parameters:

  • readyStateXHR of type stringReady state XHR. This parameter is deprecated since version 1.28.0., use parameter files instead.
  • response of type stringResponse of the completed upload request. This parameter is deprecated since version 1.28.0., use parameter files instead.
  • status of type stringStatus Code of the completed upload event. This parameter is deprecated since version 1.28.0., use parameter files instead.
  • files of type object[]A list of uploaded files. Each entry contains the following members. fileName : The name of a file to be uploaded. response : Response message which comes from the server. On the server side, this response has to be put within the 'body' tags of the response document of the iFrame. It can consist of a return code and an optional message. This does not work in cross-domain scenarios. responseRaw : HTTP-Response which comes from the server. This property is not supported by Internet Explorer Versions lower than 9. status : Status of the XHR request. This property is not supported by Internet Explorer 9 and lower. headers : HTTP-Response-Headers which come from the server. Provided as a JSON-map, i.e. each header-field is reflected by a property in the header-object, with the property value reflecting the header-field's content. This property is not supported by Internet Explorer 9 and lower. Since version 1.28.0.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
fireUploadTerminated(mArguments?): sap.m.UploadCollection
Fires event uploadTerminated to attached listeners.

Expects the following event parameters:

  • fileName of type stringSpecifies the name of the file of which the upload is to be terminated.
  • getHeaderParameter of type functionThis callback function returns the corresponding header parameter (type sap.m.UploadCollectionParameter) if available.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
getFileType(): string[]
Gets current value of property fileType.

Defines the allowed file types for the upload. The chosen files will be checked against an array of file types. If at least one file does not fit the file type requirements, the upload is prevented. Example: ["jpg", "png", "bmp"].

Returns:
{string[]} Value of property fileType
getHeaderParameters(): sap.m.UploadCollectionParameter[]
Gets content of aggregation headerParameters.

Specifies the header parameters for the FileUploader that are submitted only with XHR requests. Header parameters are not supported by Internet Explorer 8 and 9.

Returns:
{sap.m.UploadCollectionParameter[]}
getInstantUpload(): boolean
Gets current value of property instantUpload.

If false, no upload is triggered when a file is selected. In addition, if a file was selected, a new FileUploader instance is created to ensure that multiple files from multiple folders can be chosen.

Default value is true.

Since:
1.30
Returns:
{boolean} Value of property instantUpload
Gets content of aggregation items.

Uploaded items.

Returns:
{sap.m.UploadCollectionItem[]}
getMaximumFilenameLength(): int
Gets current value of property maximumFilenameLength.

Specifies the maximum length of a file name. If the maximum file name length is exceeded, the corresponding event 'filenameLengthExceed' is triggered.

Returns:
{int} Value of property maximumFilenameLength
getMaximumFileSize(): float
Gets current value of property maximumFileSize.

Specifies a file size limit in megabytes that prevents the upload if at least one file exceeds the limit. This property is not supported by Internet Explorer 8 and 9.

Returns:
{float} Value of property maximumFileSize
getMimeType(): string[]
Gets current value of property mimeType.

Defines the allowed MIME types of files to be uploaded. The chosen files will be checked against an array of MIME types. If at least one file does not fit the MIME type requirements, the upload is prevented. This property is not supported by Internet Explorer 8 and 9. Example: mimeType ["image/png", "image/jpeg"].

Returns:
{string[]} Value of property mimeType
getMode(): sap.m.ListMode
Gets current value of property mode.

Defines the selection mode of the control (e.g. None, SingleSelect, MultiSelect, SingleSelectLeft, SingleSelectMaster). Since the UploadCollection reacts like a list for attachments, the API is close to the ListBase Interface. sap.m.ListMode.Delete mode is not supported and will be automatically set to sap.m.ListMode.None. In addition, if instant upload is set to false the mode sap.m.ListMode.MultiSelect is not supported and will be automatically set to sap.m.ListMode.None.

Default value is None.

Since:
1.34
Returns:
{sap.m.ListMode} Value of property mode
getMultiple(): boolean
Gets current value of property multiple.

Lets the user select multiple files from the same folder and then upload them. Internet Explorer 8 and 9 do not support this property. Please note that the various operating systems for mobile devices can react differently to the property so that fewer upload functions may be available in some cases.

Default value is false.

Returns:
{boolean} Value of property multiple
getNoDataText(): string
Gets current value of property noDataText.

Allows you to set your own text for the 'No data' text label.

Returns:
{string} Value of property noDataText
getNumberOfAttachmentsText(): string
Gets current value of property numberOfAttachmentsText.

Sets the title text in the toolbar of the list of attachments. To show as well the number of attachments in brackets like the default text does. The number of attachments could be retrieved via "getItems().length". If a new title is set, the default is deactivated. The default value is set to language-dependent "Attachments (n)".

Since:
1.30
Returns:
{string} Value of property numberOfAttachmentsText
Gets content of aggregation parameters.

Specifies the parameters for the FileUploader that are rendered as a hidden input field.

Returns:
{sap.m.UploadCollectionParameter[]}
getSameFilenameAllowed(): boolean
Gets current value of property sameFilenameAllowed.

Allows the user to use the same name for a file when editing the file name. 'Same name' refers to an already existing file name in the list.

Default value is false.

Returns:
{boolean} Value of property sameFilenameAllowed
getSelectedItem(): sap.m.UploadCollectionItem
Returns selected UploadCollectionItem.
Since:
1.34
Returns:
{sap.m.UploadCollectionItem} selected item
getSelectedItems(): sap.m.UploadCollectionItem[]
Returns an array containing the selected UploadCollectionItems.
Since:
1.34
Returns:
{sap.m.UploadCollectionItem[]} array with selected items
getShowSeparators(): sap.m.ListSeparators
Gets current value of property showSeparators.

Defines whether separators are shown between list items.

Default value is All.

Returns:
{sap.m.ListSeparators} Value of property showSeparators
getToolbar(): sap.m.OverflowToolbar
Gets content of aggregation toolbar.

Specifies the toolbar.

Since:
1.34
Returns:
{sap.m.OverflowToolbar}
getUploadEnabled(): boolean
Gets current value of property uploadEnabled.

Enables the upload of a file.

Default value is true.

Returns:
{boolean} Value of property uploadEnabled
getUploadUrl(): string
Gets current value of property uploadUrl.

Specifies the URL where the uploaded files have to be stored.

Default value is ../../../upload.

Returns:
{string} Value of property uploadUrl
indexOfHeaderParameter(oHeaderParameter): int
Checks for the provided sap.m.UploadCollectionParameter in the aggregation headerParameters. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.UploadCollectionParameter}oHeaderParameter The headerParameter whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfItem(oItem): int
Checks for the provided sap.m.UploadCollectionItem in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.UploadCollectionItem}oItem The item whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfParameter(oParameter): int
Checks for the provided sap.m.UploadCollectionParameter in the aggregation parameters. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.UploadCollectionParameter}oParameter The parameter whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertHeaderParameter(oHeaderParameter, iIndex): sap.m.UploadCollection
Inserts a headerParameter into the aggregation headerParameters.
Parameters:
{sap.m.UploadCollectionParameter}oHeaderParameter the headerParameter to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the headerParameter should be inserted at; for a negative value of iIndex, the headerParameter is inserted at position 0; for a value greater than the current size of the aggregation, the headerParameter is inserted at the last position
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
insertItem(oItem, iIndex): sap.m.UploadCollection
Inserts a item into the aggregation items.
Parameters:
{sap.m.UploadCollectionItem}oItem the item to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
insertParameter(oParameter, iIndex): sap.m.UploadCollection
Inserts a parameter into the aggregation parameters.
Parameters:
{sap.m.UploadCollectionParameter}oParameter the parameter to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the parameter should be inserted at; for a negative value of iIndex, the parameter is inserted at position 0; for a value greater than the current size of the aggregation, the parameter is inserted at the last position
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
openFileDialog(item): sap.m.UploadCollection
Opens the FileUploader dialog. When an UploadCollectionItem is provided, this method can be used to update a file with a new version. In this case, the upload progress can be sequenced using the events: beforeUploadStarts, uploadComplete and uploadTerminated. For this use, multiple properties from the UploadCollection have to be set to false. If no UploadCollectionItem is provided, only the dialog opens and no further configuration of the UploadCollection is needed.
Parameters:
{sap.m.UploadCollectionItem}item The item to update with a new version. This parameter is mandatory.
Since:
1.38.0
Returns:
{sap.m.UploadCollection} To ensure method chaining, return the UploadCollection.
removeAllHeaderParameters(): sap.m.UploadCollectionParameter[]
Removes all the controls from the aggregation headerParameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.UploadCollectionParameter[]} An array of the removed elements (might be empty)
removeAllItems(): sap.m.UploadCollectionItem[]
Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.UploadCollectionItem[]} An array of the removed elements (might be empty)
removeAllParameters(): sap.m.UploadCollectionParameter[]
Removes all the controls from the aggregation parameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.UploadCollectionParameter[]} An array of the removed elements (might be empty)
removeHeaderParameter(vHeaderParameter): sap.m.UploadCollectionParameter
Removes a headerParameter from the aggregation headerParameters.
Parameters:
{int|string|sap.m.UploadCollectionParameter}vHeaderParameter The headerParameterto remove or its index or id
Returns:
{sap.m.UploadCollectionParameter} The removed headerParameter or null
removeItem(vItem): sap.m.UploadCollectionItem
Removes a item from the aggregation items.
Parameters:
{int|string|sap.m.UploadCollectionItem}vItem The itemto remove or its index or id
Returns:
{sap.m.UploadCollectionItem} The removed item or null
removeParameter(vParameter): sap.m.UploadCollectionParameter
Removes a parameter from the aggregation parameters.
Parameters:
{int|string|sap.m.UploadCollectionParameter}vParameter The parameterto remove or its index or id
Returns:
{sap.m.UploadCollectionParameter} The removed parameter or null
Select all items in "MultiSelection" mode.
Since:
1.34
Returns:
{sap.m.UploadCollection} The current UploadCollection
setFileType(sFileType): sap.m.UploadCollection
Sets a new value for property fileType.

Defines the allowed file types for the upload. The chosen files will be checked against an array of file types. If at least one file does not fit the file type requirements, the upload is prevented. Example: ["jpg", "png", "bmp"].

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

Parameters:
{string[]}sFileType New value for property fileType
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setInstantUpload(bInstantUpload): sap.m.UploadCollection
Sets a new value for property instantUpload.

If false, no upload is triggered when a file is selected. In addition, if a file was selected, a new FileUploader instance is created to ensure that multiple files from multiple folders can be chosen.

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

Default value is true.

Parameters:
{boolean}bInstantUpload New value for property instantUpload
Since:
1.30
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setMaximumFilenameLength(iMaximumFilenameLength): sap.m.UploadCollection
Sets a new value for property maximumFilenameLength.

Specifies the maximum length of a file name. If the maximum file name length is exceeded, the corresponding event 'filenameLengthExceed' is triggered.

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

Parameters:
{int}iMaximumFilenameLength New value for property maximumFilenameLength
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setMaximumFileSize(fMaximumFileSize): sap.m.UploadCollection
Sets a new value for property maximumFileSize.

Specifies a file size limit in megabytes that prevents the upload if at least one file exceeds the limit. This property is not supported by Internet Explorer 8 and 9.

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

Parameters:
{float}fMaximumFileSize New value for property maximumFileSize
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setMimeType(sMimeType): sap.m.UploadCollection
Sets a new value for property mimeType.

Defines the allowed MIME types of files to be uploaded. The chosen files will be checked against an array of MIME types. If at least one file does not fit the MIME type requirements, the upload is prevented. This property is not supported by Internet Explorer 8 and 9. Example: mimeType ["image/png", "image/jpeg"].

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

Parameters:
{string[]}sMimeType New value for property mimeType
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setMode(sMode): sap.m.UploadCollection
Sets a new value for property mode.

Defines the selection mode of the control (e.g. None, SingleSelect, MultiSelect, SingleSelectLeft, SingleSelectMaster). Since the UploadCollection reacts like a list for attachments, the API is close to the ListBase Interface. sap.m.ListMode.Delete mode is not supported and will be automatically set to sap.m.ListMode.None. In addition, if instant upload is set to false the mode sap.m.ListMode.MultiSelect is not supported and will be automatically set to sap.m.ListMode.None.

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

Default value is None.

Parameters:
{sap.m.ListMode}sMode New value for property mode
Since:
1.34
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setMultiple(bMultiple): sap.m.UploadCollection
Sets a new value for property multiple.

Lets the user select multiple files from the same folder and then upload them. Internet Explorer 8 and 9 do not support this property. Please note that the various operating systems for mobile devices can react differently to the property so that fewer upload functions may be available in some cases.

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

Default value is false.

Parameters:
{boolean}bMultiple New value for property multiple
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setNoDataText(sNoDataText): sap.m.UploadCollection
Sets a new value for property noDataText.

Allows you to set your own 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.

Parameters:
{string}sNoDataText New value for property noDataText
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setNumberOfAttachmentsText(sNumberOfAttachmentsText): sap.m.UploadCollection
Sets a new value for property numberOfAttachmentsText.

Sets the title text in the toolbar of the list of attachments. To show as well the number of attachments in brackets like the default text does. The number of attachments could be retrieved via "getItems().length". If a new title is set, the default is deactivated. The default value is set to language-dependent "Attachments (n)".

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

Parameters:
{string}sNumberOfAttachmentsText New value for property numberOfAttachmentsText
Since:
1.30
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setSameFilenameAllowed(bSameFilenameAllowed): sap.m.UploadCollection
Sets a new value for property sameFilenameAllowed.

Allows the user to use the same name for a file when editing the file name. 'Same name' refers to an already existing file name in the list.

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

Default value is false.

Parameters:
{boolean}bSameFilenameAllowed New value for property sameFilenameAllowed
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setSelectedItem(uploadCollectionItem, select): sap.m.UploadCollection
Selects or deselects the given list item.
Parameters:
{sap.m.UploadCollectionItem}uploadCollectionItem The item whose selection to be changed. This parameter is mandatory.
{boolean}select Sets selected status of the item. Default value is true.
Since:
1.34
Returns:
{sap.m.UploadCollection} The current UploadCollection
setSelectedItemById(id, select): sap.m.UploadCollection
Sets a UploadCollectionItem to be selected by id. In single mode, the method removes the previous selection.
Parameters:
{string}id The id of the item whose selection to be changed.
{boolean}select Sets selected status of the item. Default value is true.
Since:
1.34
Returns:
{sap.m.UploadCollection} The current UploadCollection
setShowSeparators(sShowSeparators): sap.m.UploadCollection
Sets a new value for property showSeparators.

Defines whether separators are shown between list items.

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

Default value is All.

Parameters:
{sap.m.ListSeparators}sShowSeparators New value for property showSeparators
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setToolbar(oToolbar): sap.m.UploadCollection
Sets the aggregated toolbar.
Parameters:
{sap.m.OverflowToolbar}oToolbar The toolbar to set
Since:
1.34
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setUploadEnabled(bUploadEnabled): sap.m.UploadCollection
Sets a new value for property uploadEnabled.

Enables the upload of a file.

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

Default value is true.

Parameters:
{boolean}bUploadEnabled New value for property uploadEnabled
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
setUploadUrl(sUploadUrl): sap.m.UploadCollection
Sets a new value for property uploadUrl.

Specifies the URL where the uploaded files have to be stored.

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

Default value is ../../../upload.

Parameters:
{string}sUploadUrl New value for property uploadUrl
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
unbindItems(): sap.m.UploadCollection
Unbinds aggregation items from model data.
Returns:
{sap.m.UploadCollection} Reference to this in order to allow method chaining
upload(): void
Starts the upload for all selected files.
Since:
1.30