Class sap.ui.unified.FileUploaderModule: sap/ui/unified/FileUploader

extends Control
implements IFormContent
known direct subclasses: FileUploader

The framework generates an input field and a button with text "Browse ...". The API supports features such as on change uploads (the upload starts immediately after a file has been selected), file uploads with explicit calls, adjustable control sizes, text display after uploads, or tooltips containing complete file paths.
Constructor Summary
new sap.ui.unified.FileUploader(sId?, mSettings?)Constructor for a new FileUploader.
Event Summary
change(oControlEvent)Event is fired when the value of the file path has been changed.
fileAllowed(oControlEvent)Event is fired when the file is allowed for upload on client side.
filenameLengthExceed(oControlEvent)Event is fired, if the filename of a chosen file is longer than the value specified with the maximumFilenameLength property.
fileSizeExceed(oControlEvent)Event is fired when the size of a file is above the maximumFileSize property.
typeMissmatch(oControlEvent)Event is fired when the type of a file does not match the mimeType or fileType property.
uploadAborted(oControlEvent)Event is fired after the current upload has been aborted.
uploadComplete(oControlEvent)Event is fired as soon as the upload request is completed (either successful or unsuccessful).
uploadProgress(oControlEvent)Event is fired after the upload has started and before the upload is completed and contains progress information related to the running upload.
uploadStart(oControlEvent)Event is fired before an upload is started.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.unified.FileUploader.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.unified.FileUploader with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.unified.FileUploader.getMetadata()Returns a metadata object for class sap.ui.unified.FileUploader.
abort()Aborts the currently running upload.
addHeaderParameter(oHeaderParameter)Adds some headerParameter to the aggregation headerParameters.
addParameter(oParameter)Adds some parameter to the aggregation parameters.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.ui.unified.FileUploader.
attachFileAllowed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileAllowed event of this sap.ui.unified.FileUploader.
attachFilenameLengthExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the filenameLengthExceed event of this sap.ui.unified.FileUploader.
attachFileSizeExceed(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the fileSizeExceed event of this sap.ui.unified.FileUploader.
attachTypeMissmatch(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the typeMissmatch event of this sap.ui.unified.FileUploader.
attachUploadAborted(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadAborted event of this sap.ui.unified.FileUploader.
attachUploadComplete(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadComplete event of this sap.ui.unified.FileUploader.
attachUploadProgress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadProgress event of this sap.ui.unified.FileUploader.
attachUploadStart(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the uploadStart event of this sap.ui.unified.FileUploader.
clear()Clears the content of the FileUploader.
destroyHeaderParameters()Destroys all the headerParameters in the aggregation headerParameters.
destroyParameters()Destroys all the parameters in the aggregation parameters.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.ui.unified.FileUploader.
detachFileAllowed(fnFunction, oListener)Detaches event handler fnFunction from the fileAllowed event of this sap.ui.unified.FileUploader.
detachFilenameLengthExceed(fnFunction, oListener)Detaches event handler fnFunction from the filenameLengthExceed event of this sap.ui.unified.FileUploader.
detachFileSizeExceed(fnFunction, oListener)Detaches event handler fnFunction from the fileSizeExceed event of this sap.ui.unified.FileUploader.
detachTypeMissmatch(fnFunction, oListener)Detaches event handler fnFunction from the typeMissmatch event of this sap.ui.unified.FileUploader.
detachUploadAborted(fnFunction, oListener)Detaches event handler fnFunction from the uploadAborted event of this sap.ui.unified.FileUploader.
detachUploadComplete(fnFunction, oListener)Detaches event handler fnFunction from the uploadComplete event of this sap.ui.unified.FileUploader.
detachUploadProgress(fnFunction, oListener)Detaches event handler fnFunction from the uploadProgress event of this sap.ui.unified.FileUploader.
detachUploadStart(fnFunction, oListener)Detaches event handler fnFunction from the uploadStart event of this sap.ui.unified.FileUploader.
fireChange(mParameters?)Fires event change to attached listeners.
fireFileAllowed(mParameters?)Fires event fileAllowed to attached listeners.
fireFilenameLengthExceed(mParameters?)Fires event filenameLengthExceed to attached listeners.
fireFileSizeExceed(mParameters?)Fires event fileSizeExceed to attached listeners.
fireTypeMissmatch(mParameters?)Fires event typeMissmatch to attached listeners.
fireUploadAborted(mParameters?)Fires event uploadAborted to attached listeners.
fireUploadComplete(mParameters?)Fires event uploadComplete to attached listeners.
fireUploadProgress(mParameters?)Fires event uploadProgress to attached listeners.
fireUploadStart(mParameters?)Fires event uploadStart to attached listeners.
getAdditionalData()Gets current value of property additionalData.
getButtonOnly()Gets current value of property buttonOnly.
getButtonText()Gets current value of property buttonText.
getEnabled()Gets current value of property enabled.
getFileType()Gets current value of property fileType.
getHeaderParameters()Gets content of aggregation headerParameters.
getIcon()Gets current value of property icon.
getIconFirst()Gets current value of property iconFirst.
getIconHovered()Gets current value of property iconHovered.
getIconOnly()Gets current value of property iconOnly.
getIconSelected()Gets current value of property iconSelected.
getMaximumFilenameLength()Gets current value of property maximumFilenameLength.
getMaximumFileSize()Gets current value of property maximumFileSize.
getMimeType()Gets current value of property mimeType.
getMultiple()Gets current value of property multiple.
getName()Gets current value of property name.
getParameters()Gets content of aggregation parameters.
getPlaceholder()Gets current value of property placeholder.
getSameFilenameAllowed()Gets current value of property sameFilenameAllowed.
getSendXHR()Gets current value of property sendXHR.
getStyle()Gets current value of property style.
getUploadOnChange()Gets current value of property uploadOnChange.
getUploadUrl()Gets current value of property uploadUrl.
getUseMultipart()Gets current value of property useMultipart.
getValue()Gets current value of property value.
getValueState()Gets current value of property valueState.
getWidth()Gets current value of property width.
indexOfHeaderParameter(oHeaderParameter)Checks for the provided sap.ui.unified.FileUploaderParameter in the aggregation headerParameters.
indexOfParameter(oParameter)Checks for the provided sap.ui.unified.FileUploaderParameter in the aggregation parameters.
insertHeaderParameter(oHeaderParameter, iIndex)Inserts a headerParameter into the aggregation headerParameters.
insertParameter(oParameter, iIndex)Inserts a parameter into the aggregation parameters.
removeAllHeaderParameters()Removes all the controls from the aggregation headerParameters.
removeAllParameters()Removes all the controls from the aggregation parameters.
removeHeaderParameter(vHeaderParameter)Removes a headerParameter from the aggregation headerParameters.
removeParameter(vParameter)Removes a parameter from the aggregation parameters.
setAdditionalData(sAdditionalData)Sets a new value for property additionalData.
setButtonOnly(bButtonOnly)Sets a new value for property buttonOnly.
setButtonText(sButtonText)Sets a new value for property buttonText.
setEnabled(bEnabled)Sets a new value for property enabled.
setFileType(sFileType)Sets a new value for property fileType.
setIcon(sIcon)Sets a new value for property icon.
setIconFirst(bIconFirst)Sets a new value for property iconFirst.
setIconHovered(sIconHovered)Sets a new value for property iconHovered.
setIconOnly(bIconOnly)Sets a new value for property iconOnly.
setIconSelected(sIconSelected)Sets a new value for property iconSelected.
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.
setMultiple(bMultiple)Sets a new value for property multiple.
setName(sName)Sets a new value for property name.
setPlaceholder(sPlaceholder)Sets a new value for property placeholder.
setSameFilenameAllowed(bSameFilenameAllowed)Sets a new value for property sameFilenameAllowed.
setSendXHR(bSendXHR)Sets a new value for property sendXHR.
setStyle(sStyle)Sets a new value for property style.
setUploadOnChange(bUploadOnChange)Sets a new value for property uploadOnChange.
setUploadUrl(sUploadUrl)Sets a new value for property uploadUrl.
setUseMultipart(bUseMultipart)Sets a new value for property useMultipart.
setValue(sValue)Sets a new value for property value.
setValueState(sValueState)Sets a new value for property valueState.
setWidth(sWidth)Sets a new value for property width.
upload()Starts the upload (as defined by uploadUrl)
Constructor Detail
new sap.ui.unified.FileUploader(sId?, mSettings?)

Constructor for a new FileUploader.

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]
    • uploadComplete : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • typeMissmatch : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • fileSizeExceed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • fileAllowed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • uploadProgress : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • uploadAborted : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • filenameLengthExceed : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • uploadStart : 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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
change(oControlEvent)
Event is fired when the value of the file path has been changed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.newValueNew file path value.
object[]oControlEvent.getParameters.filesFiles.
fileAllowed(oControlEvent)
Event is fired when the file is allowed for upload on client side.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
filenameLengthExceed(oControlEvent)
Event is fired, if the filename of a chosen file is longer than the value specified with the maximumFilenameLength property.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe filename, which is longer than specified by the value of the property maximumFilenameLength.
Since:
1.24.0
fileSizeExceed(oControlEvent)
Event is fired when the size of a file is above the maximumFileSize property. This event is not supported by Internet Explorer 9 (same restriction as for the property maximumFileSize).
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
stringoControlEvent.getParameters.fileSizeThe size in MB of a file to be uploaded.
typeMissmatch(oControlEvent)
Event is fired when the type of a file does not match the mimeType or fileType property.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
stringoControlEvent.getParameters.fileTypeThe file ending of a file to be uploaded.
stringoControlEvent.getParameters.mimeTypeThe MIME type of a file to be uploaded.
uploadAborted(oControlEvent)
Event is fired after the current upload has been aborted. This is event is only supported with property sendXHR set to true, i.e. the event is not supported in Internet Explorer 9.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
object[]oControlEvent.getParameters.requestHeadersHttp-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Since:
1.24.0
uploadComplete(oControlEvent)
Event is fired as soon as the upload request is completed (either successful or unsuccessful). To see if the upload request was successful, check the 'state' parameter for a value 2xx. The uploads actual progress can be retrieved via the 'uploadProgress' Event. However this covers only the client side of the Upload process and does not give any success status from the server.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
stringoControlEvent.getParameters.responseResponse 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.
stringoControlEvent.getParameters.readyStateXHRReadyState of the XHR request. Required for receiving a readyState is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.
stringoControlEvent.getParameters.statusStatus of the XHR request. Required for receiving a status is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.
stringoControlEvent.getParameters.responseRawHttp-Response which comes from the server. Required for receiving "responseRaw" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
objectoControlEvent.getParameters.headersHttp-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. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
object[]oControlEvent.getParameters.requestHeadersHttp-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
uploadProgress(oControlEvent)
Event is fired after the upload has started and before the upload is completed and contains progress information related to the running upload. Depending on file size, band width and used browser the event is fired once or multiple times. This is event is only supported with property sendXHR set to true, i.e. the event is not supported in Internet Explorer 9.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
booleanoControlEvent.getParameters.lengthComputableIndicates whether or not the relative upload progress can be calculated out of loaded and total.
floatoControlEvent.getParameters.loadedThe number of bytes of the file which have been uploaded by to the time the event was fired.
floatoControlEvent.getParameters.totalThe total size of the file to be uploaded in byte.
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
object[]oControlEvent.getParameters.requestHeadersHttp-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Since:
1.24.0
uploadStart(oControlEvent)
Event is fired before an upload is started.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.fileNameThe name of a file to be uploaded.
object[]oControlEvent.getParameters.requestHeadersHttp-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Since:
1.30.0
Method Detail
sap.ui.unified.FileUploader.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.unified.FileUploader 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.unified.FileUploader.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.FileUploader.
Returns:
sap.ui.base.MetadataMetadata object describing this class
abort(): void
Aborts the currently running upload.
Since:
1.24.0
addHeaderParameter(oHeaderParameter): sap.ui.unified.FileUploader
Adds some headerParameter to the aggregation headerParameters.
Parameters:
sap.ui.unified.FileUploaderParameteroHeaderParameterthe headerParameter to add; if empty, nothing is inserted
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
addParameter(oParameter): sap.ui.unified.FileUploader
Adds some parameter to the aggregation parameters.
Parameters:
sap.ui.unified.FileUploaderParameteroParameterthe parameter to add; if empty, nothing is inserted
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.12.2
attachChange(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the change event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired when the value of the file path has been changed.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
attachFileAllowed(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the fileAllowed event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired when the file is allowed for upload on client side.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
attachFilenameLengthExceed(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the filenameLengthExceed event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired, if the filename of a chosen file is longer than the value specified with the maximumFilenameLength property.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
attachFileSizeExceed(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the fileSizeExceed event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired when the size of a file is above the maximumFileSize property. This event is not supported by Internet Explorer 9 (same restriction as for the property maximumFileSize).

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
attachTypeMissmatch(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the typeMissmatch event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired when the type of a file does not match the mimeType or fileType property.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
attachUploadAborted(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the uploadAborted event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired after the current upload has been aborted. This is event is only supported with property sendXHR set to true, i.e. the event is not supported in Internet Explorer 9.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
attachUploadComplete(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the uploadComplete event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired as soon as the upload request is completed (either successful or unsuccessful). To see if the upload request was successful, check the 'state' parameter for a value 2xx. The uploads actual progress can be retrieved via the 'uploadProgress' Event. However this covers only the client side of the Upload process and does not give any success status from the server.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
attachUploadProgress(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the uploadProgress event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired after the upload has started and before the upload is completed and contains progress information related to the running upload. Depending on file size, band width and used browser the event is fired once or multiple times. This is event is only supported with property sendXHR set to true, i.e. the event is not supported in Internet Explorer 9.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
attachUploadStart(oData?, fnFunction, oListener?): sap.ui.unified.FileUploader

Attaches event handler fnFunction to the uploadStart event of this sap.ui.unified.FileUploader.

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.ui.unified.FileUploader itself.

Event is fired before an upload is started.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.unified.FileUploader itself
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.30.0
clear(): void
Clears the content of the FileUploader. The attached additional data however is retained.
Since:
1.25.0
destroyHeaderParameters(): sap.ui.unified.FileUploader
Destroys all the headerParameters in the aggregation headerParameters.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
destroyParameters(): sap.ui.unified.FileUploader
Destroys all the parameters in the aggregation parameters.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.12.2
detachChange(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the change event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
detachFileAllowed(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the fileAllowed event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
detachFilenameLengthExceed(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the filenameLengthExceed event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
detachFileSizeExceed(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the fileSizeExceed event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
detachTypeMissmatch(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the typeMissmatch event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
detachUploadAborted(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the uploadAborted event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
detachUploadComplete(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the uploadComplete event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
detachUploadProgress(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the uploadProgress event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
detachUploadStart(fnFunction, oListener): sap.ui.unified.FileUploader

Detaches event handler fnFunction from the uploadStart event of this sap.ui.unified.FileUploader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.30.0
fireChange(mParameters?): sap.ui.unified.FileUploader
Fires event change to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.newValue?New file path value.
object[]mParameters.files?Files.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
fireFileAllowed(mParameters?): sap.ui.unified.FileUploader
Fires event fileAllowed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
fireFilenameLengthExceed(mParameters?): sap.ui.unified.FileUploader
Fires event filenameLengthExceed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The filename, which is longer than specified by the value of the property maximumFilenameLength.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
fireFileSizeExceed(mParameters?): sap.ui.unified.FileUploader
Fires event fileSizeExceed to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The name of a file to be uploaded.
stringmParameters.fileSize?The size in MB of a file to be uploaded.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
fireTypeMissmatch(mParameters?): sap.ui.unified.FileUploader
Fires event typeMissmatch to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The name of a file to be uploaded.
stringmParameters.fileType?The file ending of a file to be uploaded.
stringmParameters.mimeType?The MIME type of a file to be uploaded.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
fireUploadAborted(mParameters?): sap.ui.unified.FileUploader
Fires event uploadAborted to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The name of a file to be uploaded.
object[]mParameters.requestHeaders?Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
fireUploadComplete(mParameters?): sap.ui.unified.FileUploader
Fires event uploadComplete to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The name of a file to be uploaded.
stringmParameters.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.
stringmParameters.readyStateXHR?ReadyState of the XHR request. Required for receiving a readyState is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.
stringmParameters.status?Status of the XHR request. Required for receiving a status is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.
stringmParameters.responseRaw?Http-Response which comes from the server. Required for receiving "responseRaw" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
objectmParameters.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. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
object[]mParameters.requestHeaders?Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
fireUploadProgress(mParameters?): sap.ui.unified.FileUploader
Fires event uploadProgress to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
booleanmParameters.lengthComputable?Indicates whether or not the relative upload progress can be calculated out of loaded and total.
floatmParameters.loaded?The number of bytes of the file which have been uploaded by to the time the event was fired.
floatmParameters.total?The total size of the file to be uploaded in byte.
stringmParameters.fileName?The name of a file to be uploaded.
object[]mParameters.requestHeaders?Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
fireUploadStart(mParameters?): sap.ui.unified.FileUploader
Fires event uploadStart to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.fileName?The name of a file to be uploaded.
object[]mParameters.requestHeaders?Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.30.0
getAdditionalData(): string

Gets current value of property additionalData.

Additional data that is sent to the back end service. Data will be transmitted as value of a hidden input where the name is derived from the name property with suffix -data.

Returns:
stringValue of property additionalData
getButtonOnly(): boolean

Gets current value of property buttonOnly.

If set to "true", the FileUploader will be rendered as Button only, without showing the InputField.

Default value is false.

Returns:
booleanValue of property buttonOnly
getButtonText(): string

Gets current value of property buttonText.

The Button text can be overwritten using this property.

Returns:
stringValue of property buttonText
getEnabled(): boolean

Gets current value of property enabled.

Disabled controls have different colors, depending on customer settings.

Default value is true.

Returns:
booleanValue of property enabled
getFileType(): string[]

Gets current value of property fileType.

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

Returns:
string[]Value of property fileType
getHeaderParameters(): sap.ui.unified.FileUploaderParameter[]

Gets content of aggregation headerParameters.

The header parameters for the FileUploader which are only submitted with XHR requests. Header parameters are not supported by Internet Explorer 9.

Returns:
sap.ui.unified.FileUploaderParameter[]
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Icon to be displayed as graphical element within the button. This can be a URI to an image or an icon font URI.

Default value is .

Returns:
sap.ui.core.URIValue of property icon
Since:
1.26.0
getIconFirst(): boolean

Gets current value of property iconFirst.

If set to true (default), the display sequence is 1. icon 2. control text.

Default value is true.

Returns:
booleanValue of property iconFirst
Since:
1.26.0
getIconHovered(): sap.ui.core.URI

Gets current value of property iconHovered.

Icon to be displayed as graphical element within the button when it is hovered (only if also a base icon was specified). If not specified the base icon is used. If an icon font icon is used, this property is ignored.

Default value is .

Returns:
sap.ui.core.URIValue of property iconHovered
Since:
1.26.0
getIconOnly(): boolean

Gets current value of property iconOnly.

If set to true, the button is displayed without any text.

Default value is false.

Returns:
booleanValue of property iconOnly
Since:
1.26.0
getIconSelected(): sap.ui.core.URI

Gets current value of property iconSelected.

Icon to be displayed as graphical element within the button when it is selected (only if also a base icon was specified). If not specified the base or hovered icon is used. If an icon font icon is used, this property is ignored.

Default value is .

Returns:
sap.ui.core.URIValue of property iconSelected
Since:
1.26.0
getMaximumFilenameLength(): int

Gets current value of property maximumFilenameLength.

The maximum length of a filename which the FileUploader will accept. If the maximum filename length is exceeded, the corresponding Event 'filenameLengthExceed' is fired.

Returns:
intValue of property maximumFilenameLength
Since:
1.24.0
getMaximumFileSize(): float

Gets current value of property maximumFileSize.

A file size limit in megabytes which prevents the upload if at least one file exceeds it. This property is not supported by Internet Explorer 9.

Returns:
floatValue of property maximumFileSize
getMimeType(): string[]

Gets current value of property mimeType.

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

Returns:
string[]Value of property mimeType
getMultiple(): boolean

Gets current value of property multiple.

Allows multiple files to be chosen and uploaded from the same folder. This property is not supported by Internet Explorer 9.

Default value is false.

Returns:
booleanValue of property multiple
getName(): string

Gets current value of property name.

Unique control name for identification on the server side after sending data to the server.

Returns:
stringValue of property name

Gets content of aggregation parameters.

The parameters for the FileUploader which are rendered as a hidden inputfield.

Returns:
sap.ui.unified.FileUploaderParameter[]
Since:
1.12.2
getPlaceholder(): string

Gets current value of property placeholder.

Placeholder for the text field.

Returns:
stringValue of property placeholder
getSameFilenameAllowed(): boolean

Gets current value of property sameFilenameAllowed.

If the FileUploader is configured to upload the file directly after the file is selected it is not allowed to upload a file with the same name again. If a user should be allowed to upload a file with the same name again this parameter has to be "true". A typical use case would be if the files have different paths.

Default value is false.

Returns:
booleanValue of property sameFilenameAllowed
getSendXHR(): boolean

Gets current value of property sendXHR.

If set to "true", the request will be sent as XHR request instead of a form submit. This property is not supported by Internet Explorer 9.

Default value is false.

Returns:
booleanValue of property sendXHR
getStyle(): string

Gets current value of property style.

Style of the button. "Transparent, "Accept", "Reject", or "Emphasized" is allowed.

Returns:
stringValue of property style
getUploadOnChange(): boolean

Gets current value of property uploadOnChange.

If set to "true", the upload immediately starts after file selection. With the default setting, the upload needs to be explicitly triggered.

Default value is false.

Returns:
booleanValue of property uploadOnChange
getUploadUrl(): sap.ui.core.URI

Gets current value of property uploadUrl.

Used when URL address is on a remote server.

Default value is .

Returns:
sap.ui.core.URIValue of property uploadUrl
getUseMultipart(): boolean

Gets current value of property useMultipart.

If set to "false", the request will be sent as file only request instead of a multipart/form-data request. Only one file could be uploaded using this type of request. Required for sending such a request is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.

Default value is true.

Returns:
booleanValue of property useMultipart
getValue(): string

Gets current value of property value.

Value of the path for file upload.

Default value is .

Returns:
stringValue of property value
getValueState(): sap.ui.core.ValueState

Gets current value of property valueState.

Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success, None.

Default value is None.

Returns:
sap.ui.core.ValueStateValue of property valueState
Since:
1.24.0
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

Specifies the displayed control width.

Default value is .

Returns:
sap.ui.core.CSSSizeValue of property width
indexOfHeaderParameter(oHeaderParameter): int
Checks for the provided sap.ui.unified.FileUploaderParameter in the aggregation headerParameters. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.FileUploaderParameteroHeaderParameterThe headerParameter whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
indexOfParameter(oParameter): int
Checks for the provided sap.ui.unified.FileUploaderParameter in the aggregation parameters. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.unified.FileUploaderParameteroParameterThe parameter whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.12.2
insertHeaderParameter(oHeaderParameter, iIndex): sap.ui.unified.FileUploader
Inserts a headerParameter into the aggregation headerParameters.
Parameters:
sap.ui.unified.FileUploaderParameteroHeaderParameterthe headerParameter to insert; if empty, nothing is inserted
intiIndexthe 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.ui.unified.FileUploaderReference to this in order to allow method chaining
insertParameter(oParameter, iIndex): sap.ui.unified.FileUploader
Inserts a parameter into the aggregation parameters.
Parameters:
sap.ui.unified.FileUploaderParameteroParameterthe parameter to insert; if empty, nothing is inserted
intiIndexthe 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.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.12.2
removeAllHeaderParameters(): sap.ui.unified.FileUploaderParameter[]

Removes all the controls from the aggregation headerParameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.FileUploaderParameter[]An array of the removed elements (might be empty)
removeAllParameters(): sap.ui.unified.FileUploaderParameter[]

Removes all the controls from the aggregation parameters.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.unified.FileUploaderParameter[]An array of the removed elements (might be empty)
Since:
1.12.2
removeHeaderParameter(vHeaderParameter): sap.ui.unified.FileUploaderParameter
Removes a headerParameter from the aggregation headerParameters.
Parameters:
int|string|sap.ui.unified.FileUploaderParametervHeaderParameterThe headerParameter to remove or its index or id
Returns:
sap.ui.unified.FileUploaderParameterThe removed headerParameter or null
removeParameter(vParameter): sap.ui.unified.FileUploaderParameter
Removes a parameter from the aggregation parameters.
Parameters:
int|string|sap.ui.unified.FileUploaderParametervParameterThe parameter to remove or its index or id
Returns:
sap.ui.unified.FileUploaderParameterThe removed parameter or null
Since:
1.12.2
setAdditionalData(sAdditionalData): sap.ui.unified.FileUploader

Sets a new value for property additionalData.

Additional data that is sent to the back end service. Data will be transmitted as value of a hidden input where the name is derived from the name property with suffix -data.

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

Parameters:
stringsAdditionalDataNew value for property additionalData
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setButtonOnly(bButtonOnly): sap.ui.unified.FileUploader

Sets a new value for property buttonOnly.

If set to "true", the FileUploader will be rendered as Button only, without showing the InputField.

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

Default value is false.

Parameters:
booleanbButtonOnlyNew value for property buttonOnly
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setButtonText(sButtonText): sap.ui.unified.FileUploader

Sets a new value for property buttonText.

The Button text can be overwritten using this property.

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

Parameters:
stringsButtonTextNew value for property buttonText
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setEnabled(bEnabled): sap.ui.unified.FileUploader

Sets a new value for property enabled.

Disabled controls have different colors, depending on customer settings.

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

Default value is true.

Parameters:
booleanbEnabledNew value for property enabled
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setFileType(sFileType): sap.ui.unified.FileUploader

Sets a new value for property fileType.

The chosen files will be checked against an array of file types. If at least one file does not fit the file type restriction 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[]sFileTypeNew value for property fileType
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining

Sets a new value for property icon.

Icon to be displayed as graphical element within the button. This can be a URI to an image or an icon font URI.

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

Default value is .

Parameters:
sap.ui.core.URIsIconNew value for property icon
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.26.0
setIconFirst(bIconFirst): sap.ui.unified.FileUploader

Sets a new value for property iconFirst.

If set to true (default), the display sequence is 1. icon 2. control text.

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

Default value is true.

Parameters:
booleanbIconFirstNew value for property iconFirst
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.26.0
setIconHovered(sIconHovered): sap.ui.unified.FileUploader

Sets a new value for property iconHovered.

Icon to be displayed as graphical element within the button when it is hovered (only if also a base icon was specified). If not specified the base icon is used. If an icon font icon is used, this property is ignored.

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

Default value is .

Parameters:
sap.ui.core.URIsIconHoveredNew value for property iconHovered
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.26.0
setIconOnly(bIconOnly): sap.ui.unified.FileUploader

Sets a new value for property iconOnly.

If set to true, the button is displayed without any text.

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

Default value is false.

Parameters:
booleanbIconOnlyNew value for property iconOnly
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.26.0
setIconSelected(sIconSelected): sap.ui.unified.FileUploader

Sets a new value for property iconSelected.

Icon to be displayed as graphical element within the button when it is selected (only if also a base icon was specified). If not specified the base or hovered icon is used. If an icon font icon is used, this property is ignored.

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

Default value is .

Parameters:
sap.ui.core.URIsIconSelectedNew value for property iconSelected
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.26.0
setMaximumFilenameLength(iMaximumFilenameLength): sap.ui.unified.FileUploader

Sets a new value for property maximumFilenameLength.

The maximum length of a filename which the FileUploader will accept. If the maximum filename length is exceeded, the corresponding Event 'filenameLengthExceed' is fired.

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

Parameters:
intiMaximumFilenameLengthNew value for property maximumFilenameLength
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
setMaximumFileSize(fMaximumFileSize): sap.ui.unified.FileUploader

Sets a new value for property maximumFileSize.

A file size limit in megabytes which prevents the upload if at least one file exceeds it. This property is not supported by Internet Explorer 9.

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

Parameters:
floatfMaximumFileSizeNew value for property maximumFileSize
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setMimeType(sMimeType): sap.ui.unified.FileUploader

Sets a new value for property mimeType.

The chosen files will be checked against an array of mime types. If at least one file does not fit the mime type restriction the upload is prevented. This property is not supported by Internet Explorer 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[]sMimeTypeNew value for property mimeType
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setMultiple(bMultiple): sap.ui.unified.FileUploader

Sets a new value for property multiple.

Allows multiple files to be chosen and uploaded from the same folder. This property is not supported by Internet Explorer 9.

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

Default value is false.

Parameters:
booleanbMultipleNew value for property multiple
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining

Sets a new value for property name.

Unique control name for identification on the server side after sending data to the server.

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

Parameters:
stringsNameNew value for property name
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setPlaceholder(sPlaceholder): sap.ui.unified.FileUploader

Sets a new value for property placeholder.

Placeholder for the text field.

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

Parameters:
stringsPlaceholderNew value for property placeholder
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setSameFilenameAllowed(bSameFilenameAllowed): sap.ui.unified.FileUploader

Sets a new value for property sameFilenameAllowed.

If the FileUploader is configured to upload the file directly after the file is selected it is not allowed to upload a file with the same name again. If a user should be allowed to upload a file with the same name again this parameter has to be "true". A typical use case would be if the files have different paths.

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

Default value is false.

Parameters:
booleanbSameFilenameAllowedNew value for property sameFilenameAllowed
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setSendXHR(bSendXHR): sap.ui.unified.FileUploader

Sets a new value for property sendXHR.

If set to "true", the request will be sent as XHR request instead of a form submit. This property is not supported by Internet Explorer 9.

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

Default value is false.

Parameters:
booleanbSendXHRNew value for property sendXHR
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setStyle(sStyle): sap.ui.unified.FileUploader

Sets a new value for property style.

Style of the button. "Transparent, "Accept", "Reject", or "Emphasized" is allowed.

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

Parameters:
stringsStyleNew value for property style
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setUploadOnChange(bUploadOnChange): sap.ui.unified.FileUploader

Sets a new value for property uploadOnChange.

If set to "true", the upload immediately starts after file selection. With the default setting, the upload needs to be explicitly triggered.

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

Default value is false.

Parameters:
booleanbUploadOnChangeNew value for property uploadOnChange
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setUploadUrl(sUploadUrl): sap.ui.unified.FileUploader

Sets a new value for property uploadUrl.

Used when URL address is on a remote server.

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

Default value is .

Parameters:
sap.ui.core.URIsUploadUrlNew value for property uploadUrl
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setUseMultipart(bUseMultipart): sap.ui.unified.FileUploader

Sets a new value for property useMultipart.

If set to "false", the request will be sent as file only request instead of a multipart/form-data request. Only one file could be uploaded using this type of request. Required for sending such a request is to set the property "sendXHR" to "true". This property is not supported by Internet Explorer 9.

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

Default value is true.

Parameters:
booleanbUseMultipartNew value for property useMultipart
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setValue(sValue): sap.ui.unified.FileUploader

Sets a new value for property value.

Value of the path for file upload.

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

Default value is .

Parameters:
stringsValueNew value for property value
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
setValueState(sValueState): sap.ui.unified.FileUploader

Sets a new value for property valueState.

Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success, 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.ui.core.ValueStatesValueStateNew value for property valueState
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
Since:
1.24.0
setWidth(sWidth): sap.ui.unified.FileUploader

Sets a new value for property width.

Specifies the displayed control width.

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

Default value is .

Parameters:
sap.ui.core.CSSSizesWidthNew value for property width
Returns:
sap.ui.unified.FileUploaderReference to this in order to allow method chaining
upload(): void
Starts the upload (as defined by uploadUrl)