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

extends Control
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(mArguments?)Fires event change to attached listeners.
fireFileAllowed(mArguments?)Fires event fileAllowed to attached listeners.
fireFilenameLengthExceed(mArguments?)Fires event filenameLengthExceed to attached listeners.
fireFileSizeExceed(mArguments?)Fires event fileSizeExceed to attached listeners.
fireTypeMissmatch(mArguments?)Fires event typeMissmatch to attached listeners.
fireUploadAborted(mArguments?)Fires event uploadAborted to attached listeners.
fireUploadComplete(mArguments?)Fires event uploadComplete to attached listeners.
fireUploadProgress(mArguments?)Fires event uploadProgress to attached listeners.
fireUploadStart(mArguments?)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:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? 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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.newValue New file path value.
{object[]}oControlEvent.getParameters.files Files.
fileAllowed(oControlEvent)
Event is fired when the file is allowed for upload on client side.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The 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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{string}oControlEvent.getParameters.fileSize The 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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{string}oControlEvent.getParameters.fileType The file ending of a file to be uploaded.
{string}oControlEvent.getParameters.mimeType The 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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{object[]}oControlEvent.getParameters.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.
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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{string}oControlEvent.getParameters.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.
{string}oControlEvent.getParameters.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.
{string}oControlEvent.getParameters.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.
{string}oControlEvent.getParameters.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.
{object}oControlEvent.getParameters.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[]}oControlEvent.getParameters.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.
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.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{boolean}oControlEvent.getParameters.lengthComputable Indicates whether or not the relative upload progress can be calculated out of loaded and total.
{float}oControlEvent.getParameters.loaded The number of bytes of the file which have been uploaded by to the time the event was fired.
{float}oControlEvent.getParameters.total The total size of the file to be uploaded in byte.
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{object[]}oControlEvent.getParameters.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.
Since:
1.24.0
uploadStart(oControlEvent)
Event is fired before an upload is started.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.fileName The name of a file to be uploaded.
{object[]}oControlEvent.getParameters.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.
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:
{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.ui.unified.FileUploader.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.unified.FileUploader.
Returns:
{sap.ui.base.Metadata} Metadata 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.FileUploaderParameter}oHeaderParameter the headerParameter to add; if empty, nothing is inserted
Returns:
{sap.ui.unified.FileUploader} Reference 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.FileUploaderParameter}oParameter the parameter to add; if empty, nothing is inserted
Since:
1.12.2
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader itself
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader itself
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader itself
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader itself
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader itself
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader itself
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader itself
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader itself
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader itself
Since:
1.30.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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.FileUploader} Reference to this in order to allow method chaining
destroyParameters(): sap.ui.unified.FileUploader
Destroys all the parameters in the aggregation parameters.
Since:
1.12.2
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader} Reference 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:
{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.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader} Reference 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:
{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.ui.unified.FileUploader} Reference 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:
{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.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.ui.unified.FileUploader} Reference 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:
{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.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{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.30.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireChange(mArguments?): sap.ui.unified.FileUploader
Fires event change to attached listeners.

Expects the following event parameters:

  • newValue of type stringNew file path value.
  • files of type object[]Files.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireFileAllowed(mArguments?): sap.ui.unified.FileUploader
Fires event fileAllowed to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireFilenameLengthExceed(mArguments?): sap.ui.unified.FileUploader
Fires event filenameLengthExceed to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe filename, which is longer than specified by the value of the property maximumFilenameLength.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireFileSizeExceed(mArguments?): sap.ui.unified.FileUploader
Fires event fileSizeExceed to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe name of a file to be uploaded.
  • fileSize of type stringThe size in MB of a file to be uploaded.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireTypeMissmatch(mArguments?): sap.ui.unified.FileUploader
Fires event typeMissmatch to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe name of a file to be uploaded.
  • fileType of type stringThe file ending of a file to be uploaded.
  • mimeType of type stringThe MIME type of a file to be uploaded.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireUploadAborted(mArguments?): sap.ui.unified.FileUploader
Fires event uploadAborted to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe name of a file to be uploaded.
  • requestHeaders of type object[]Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireUploadComplete(mArguments?): sap.ui.unified.FileUploader
Fires event uploadComplete to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe name of a file to be uploaded.
  • response of type stringResponse 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.
  • readyStateXHR of type stringReadyState 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.
  • status of type stringStatus 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.
  • responseRaw of type stringHttp-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.
  • headers of type objectHttp-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.
  • requestHeaders of type object[]Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireUploadProgress(mArguments?): sap.ui.unified.FileUploader
Fires event uploadProgress to attached listeners.

Expects the following event parameters:

  • lengthComputable of type booleanIndicates whether or not the relative upload progress can be calculated out of loaded and total.
  • loaded of type floatThe number of bytes of the file which have been uploaded by to the time the event was fired.
  • total of type floatThe total size of the file to be uploaded in byte.
  • fileName of type stringThe name of a file to be uploaded.
  • requestHeaders of type object[]Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
fireUploadStart(mArguments?): sap.ui.unified.FileUploader
Fires event uploadStart to attached listeners.

Expects the following event parameters:

  • fileName of type stringThe name of a file to be uploaded.
  • requestHeaders of type object[]Http-Request-Headers. Required for receiving "header" is to set the property "sendXHR" to true. This property is not supported by Internet Explorer 9.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.30.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{string} Value 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:
{boolean} Value of property buttonOnly
getButtonText(): string
Gets current value of property buttonText.

The Button text can be overwritten using this property.

Returns:
{string} Value 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:
{boolean} Value 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 an URI to an image or an icon font URI.

Default value is .

Since:
1.26.0
Returns:
{sap.ui.core.URI} Value of property icon
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.

Since:
1.26.0
Returns:
{boolean} Value of property iconFirst
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 a icon font icon is used, this property is ignored.

Default value is .

Since:
1.26.0
Returns:
{sap.ui.core.URI} Value of property iconHovered
getIconOnly(): boolean
Gets current value of property iconOnly.

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

Default value is false.

Since:
1.26.0
Returns:
{boolean} Value of property iconOnly
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 a icon font icon is used, this property is ignored.

Default value is .

Since:
1.26.0
Returns:
{sap.ui.core.URI} Value of property iconSelected
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.

Since:
1.24.0
Returns:
{int} Value of property maximumFilenameLength
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:
{float} Value 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.

Note: Keep in mind 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
getName(): string
Gets current value of property name.

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

Returns:
{string} Value of property name
Gets content of aggregation parameters.

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

Since:
1.12.2
Returns:
{sap.ui.unified.FileUploaderParameter[]}
getPlaceholder(): string
Gets current value of property placeholder.

Placeholder for the text field.

Returns:
{string} Value 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:
{boolean} Value 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:
{boolean} Value of property sendXHR
getStyle(): string
Gets current value of property style.

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

Returns:
{string} Value 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:
{boolean} Value 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.URI} Value 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:
{boolean} Value of property useMultipart
getValue(): string
Gets current value of property value.

Value of the path for file upload.

Default value is .

Returns:
{string} Value 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.

Since:
1.24.0
Returns:
{sap.ui.core.ValueState} Value of property valueState
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Specifies the displayed control width.

Default value is .

Returns:
{sap.ui.core.CSSSize} Value 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.FileUploaderParameter}oHeaderParameter The headerParameter 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.ui.unified.FileUploaderParameter in the aggregation parameters. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.unified.FileUploaderParameter}oParameter The parameter whose index is looked for
Since:
1.12.2
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertHeaderParameter(oHeaderParameter, iIndex): sap.ui.unified.FileUploader
Inserts a headerParameter into the aggregation headerParameters.
Parameters:
{sap.ui.unified.FileUploaderParameter}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.ui.unified.FileUploader} Reference 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.FileUploaderParameter}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
Since:
1.12.2
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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.

Since:
1.12.2
Returns:
{sap.ui.unified.FileUploaderParameter[]} An array of the removed elements (might be empty)
removeHeaderParameter(vHeaderParameter): sap.ui.unified.FileUploaderParameter
Removes a headerParameter from the aggregation headerParameters.
Parameters:
{int|string|sap.ui.unified.FileUploaderParameter}vHeaderParameter The headerParameterto remove or its index or id
Returns:
{sap.ui.unified.FileUploaderParameter} The removed headerParameter or null
removeParameter(vParameter): sap.ui.unified.FileUploaderParameter
Removes a parameter from the aggregation parameters.
Parameters:
{int|string|sap.ui.unified.FileUploaderParameter}vParameter The parameterto remove or its index or id
Since:
1.12.2
Returns:
{sap.ui.unified.FileUploaderParameter} The removed parameter or null
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:
{string}sAdditionalData New value for property additionalData
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bButtonOnly New value for property buttonOnly
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{string}sButtonText New value for property buttonText
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bEnabled New value for property enabled
Returns:
{sap.ui.unified.FileUploader} Reference 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[]}sFileType New value for property fileType
Returns:
{sap.ui.unified.FileUploader} Reference 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 an 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.URI}sIcon New value for property icon
Since:
1.26.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{boolean}bIconFirst New value for property iconFirst
Since:
1.26.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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 a 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.URI}sIconHovered New value for property iconHovered
Since:
1.26.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{boolean}bIconOnly New value for property iconOnly
Since:
1.26.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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 a 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.URI}sIconSelected New value for property iconSelected
Since:
1.26.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{int}iMaximumFilenameLength New value for property maximumFilenameLength
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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:
{float}fMaximumFileSize New value for property maximumFileSize
Returns:
{sap.ui.unified.FileUploader} Reference 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[]}sMimeType New value for property mimeType
Returns:
{sap.ui.unified.FileUploader} Reference 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.

Note: Keep in mind 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.ui.unified.FileUploader} Reference 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:
{string}sName New value for property name
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{string}sPlaceholder New value for property placeholder
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bSameFilenameAllowed New value for property sameFilenameAllowed
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bSendXHR New value for property sendXHR
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{string}sStyle New value for property style
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bUploadOnChange New value for property uploadOnChange
Returns:
{sap.ui.unified.FileUploader} Reference 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.URI}sUploadUrl New value for property uploadUrl
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{boolean}bUseMultipart New value for property useMultipart
Returns:
{sap.ui.unified.FileUploader} Reference 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:
{string}sValue New value for property value
Returns:
{sap.ui.unified.FileUploader} Reference 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.ValueState}sValueState New value for property valueState
Since:
1.24.0
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
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.CSSSize}sWidth New value for property width
Returns:
{sap.ui.unified.FileUploader} Reference to this in order to allow method chaining
upload(): void
Starts the upload (as defined by uploadUrl)