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 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#constructor for a general description of the syntax of the settings object.
new sap.ui.unified.FileUploader(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
additionalData | string | 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 |
|
buttonOnly | boolean | false | If set to "true", the |
buttonText | string | The button's text can be overwritten using this property. Visibility: public |
|
enabled | boolean | true | Disabled controls have different colors, depending on customer settings. Visibility: public |
fileType | string[] | 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. Note: This property is not supported by Microsoft Edge. Example: |
|
httpRequestMethod | sap.ui.unified.FileUploaderHttpRequestMethod | Post | Chosen HTTP request method for file upload. |
icon | sap.ui.core.URI | empty string | Icon to be displayed as graphical element within the button. This can be a URI to an image or an icon font URI. |
iconFirst | boolean | true | If set to true (default), the display sequence is 1. icon 2. control text. |
iconHovered | sap.ui.core.URI | empty string | 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. |
iconOnly | boolean | false | If set to true, the button is displayed without any text. |
iconSelected | sap.ui.core.URI | empty string | 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. |
maximumFileSize | float | 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. Visibility: public |
|
maximumFilenameLength | int | The maximum length of a filename which the If the maximum filename length is exceeded, the corresponding event |
|
mimeType | string[] | The chosen files will be checked against an array of MIME types defined in this property. If at least one file does not fit the MIME type restriction, the upload is prevented. Note: This property is not supported by Internet Explorer. It is only reliable for common file types like images, audio, video, plain text and HTML documents. File types that are not recognized by the browser result in Example: |
|
multiple | boolean | false | 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. Visibility: public |
name | string | Unique control name for identification on the server side after sending data to the server. Visibility: public |
|
placeholder | string | Placeholder for the text field. Visibility: public |
|
sameFilenameAllowed | boolean | false | 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. Visibility: public |
sendXHR | boolean | false | 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. Visibility: public |
style | string | Style of the button. Values "Transparent, "Accept", "Reject", or "Emphasized" are allowed. Visibility: public |
|
uploadOnChange | boolean | false | If set to "true", the upload immediately starts after file selection. With the default setting, the upload needs to be explicitly triggered. Visibility: public |
uploadUrl | sap.ui.core.URI | empty string | Used when URL address is on a remote server. Visibility: public |
useMultipart | boolean | true | 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 |
value | string | empty string | Value of the path for file upload. Visibility: public |
valueState | sap.ui.core.ValueState | None | Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success, None. |
valueStateText | string | Custom text for the value state message pop-up. Note: If not specified, a default text, based on the value state type, will be used instead. |
|
width | sap.ui.core.CSSSize | empty string | Specifies the displayed control width. Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
headerParameters | 0..n | sap.ui.unified.FileUploaderParameter |
The header parameters for the |
parameters | 0..n | sap.ui.unified.FileUploaderParameter |
The parameters for the |
xhrSettings | 0..1 | sap.ui.unified.FileUploaderXHRSettings |
Settings for the |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaDescribedBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which describe this control (see WAI-ARIA attribute |
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which label this control (see WAI-ARIA attribute |
Event | Description |
---|---|
change |
Event is fired when the value of the file path has been changed. Note: Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed. |
fileAllowed |
Event is fired when the file is allowed for upload on client side. |
fileEmpty |
Event is fired when the size of the file is 0 |
filenameLengthExceed |
Event is fired, if the filename of a chosen file is longer than the value specified with the |
fileSizeExceed |
Event is fired when the size of a file is above the |
typeMissmatch |
Event is fired when the type of a file does not match the |
uploadAborted |
Event is fired after the current upload has been aborted. This event is only supported with property |
uploadComplete |
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 |
uploadProgress |
Event is fired after the upload has started and before the upload is completed. It 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 event is only supported with property |
uploadStart |
Event is fired before an upload is started. |
Event is fired when the value of the file path has been changed.
Note: Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
newValue | string |
New file path value. |
files | object[] |
Files. |
Event is fired when the file is allowed for upload on client side.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Event is fired when the size of the file is 0
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of the file to be uploaded. |
Event is fired, if the filename of a chosen file is longer than the value specified with the maximumFilenameLength
property.
Since: 1.24.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The filename, which is longer than specified by the value of the property |
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
).
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of a file to be uploaded. |
fileSize | string |
The size in MB of a file to be uploaded. |
Event is fired when the type of a file does not match the mimeType
or fileType
property.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of a file to be uploaded. |
fileType | string |
The file ending of a file to be uploaded. |
mimeType | string |
The MIME type of a file to be uploaded. |
Event is fired after the current upload has been aborted.
This event is only supported with property sendXHR
set to true, i.e. the event is not supported in Internet Explorer 9.
Since: 1.24.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of a file to be uploaded. |
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
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 status
parameter for a value 2xx. The actual progress of the upload can be monitored by listening to the uploadProgress
event. However, this covers only the client side of the upload process and does not give any success status from the server.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of a file to be uploaded. |
response | string |
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. |
readyStateXHR | string |
ReadyState of the XHR request. Required for receiving a |
status | string |
Status of the XHR request. Required for receiving a |
responseRaw | string |
Http-Response which comes from the server. Required for receiving This property is not supported by Internet Explorer 9. |
headers | object |
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 Required for receiving |
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Event is fired after the upload has started and before the upload is completed.
It 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 event is only supported with property sendXHR
set to true, i.e. the event is not supported in Internet Explorer 9.
Since: 1.24.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
lengthComputable | boolean |
Indicates whether or not the relative upload progress can be calculated out of loaded and total. |
loaded | float |
The number of bytes of the file which have been uploaded by the time the event was fired. |
total | float |
The total size of the file to be uploaded in bytes. |
fileName | string |
The name of a file to be uploaded. |
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Event is fired before an upload is started.
Since: 1.30.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
fileName | string |
The name of a file to be uploaded. |
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Method | Description |
---|---|
abort |
Aborts the currently running upload. |
addAriaDescribedBy |
Adds some ariaDescribedBy into the association ariaDescribedBy. |
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addHeaderParameter |
Adds some headerParameter to the aggregation headerParameters. |
addParameter |
Adds some parameter to the aggregation parameters. |
attachChange |
Attaches event handler When called, the context of the event handler (its Event is fired when the value of the file path has been changed. Note: Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed. |
attachFileAllowed |
Attaches event handler When called, the context of the event handler (its Event is fired when the file is allowed for upload on client side. |
attachFileEmpty |
Attaches event handler When called, the context of the event handler (its Event is fired when the size of the file is 0 |
attachFilenameLengthExceed |
Attaches event handler When called, the context of the event handler (its Event is fired, if the filename of a chosen file is longer than the value specified with the |
attachFileSizeExceed |
Attaches event handler When called, the context of the event handler (its Event is fired when the size of a file is above the |
attachTypeMissmatch |
Attaches event handler When called, the context of the event handler (its Event is fired when the type of a file does not match the |
attachUploadAborted |
Attaches event handler When called, the context of the event handler (its Event is fired after the current upload has been aborted. This event is only supported with property |
attachUploadComplete |
Attaches event handler When called, the context of the event handler (its 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 |
attachUploadProgress |
Attaches event handler When called, the context of the event handler (its Event is fired after the upload has started and before the upload is completed. It 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 event is only supported with property |
attachUploadStart |
Attaches event handler When called, the context of the event handler (its Event is fired before an upload is started. |
checkFileReadable |
Checks if the chosen file is readable. |
clear |
Clears the content of the Note: The attached additional data however is retained. |
destroyHeaderParameters |
Destroys all the headerParameters in the aggregation headerParameters. |
destroyParameters |
Destroys all the parameters in the aggregation parameters. |
destroyXhrSettings |
Destroys the xhrSettings in the aggregation xhrSettings. |
detachChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileAllowed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileEmpty |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFilenameLengthExceed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFileSizeExceed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachTypeMissmatch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadAborted |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadComplete |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadProgress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachUploadStart |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.unified.FileUploader.extend |
Creates a new subclass of class sap.ui.unified.FileUploader with name
|
fireChange |
Fires event change to attached listeners. |
fireFileAllowed |
Fires event fileAllowed to attached listeners. |
fireFileEmpty |
Fires event fileEmpty to attached listeners. |
fireFilenameLengthExceed |
Fires event filenameLengthExceed to attached listeners. |
fireFileSizeExceed |
Fires event fileSizeExceed to attached listeners. |
fireTypeMissmatch |
Fires event typeMissmatch to attached listeners. |
fireUploadAborted |
Fires event uploadAborted to attached listeners. |
fireUploadComplete |
Fires event uploadComplete to attached listeners. |
fireUploadProgress |
Fires event uploadProgress to attached listeners. |
fireUploadStart |
Fires event uploadStart to attached listeners. |
getAdditionalData |
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 |
getAriaDescribedBy |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getButtonOnly |
Gets current value of property buttonOnly. If set to "true", the Default value is |
getButtonText |
Gets current value of property buttonText. The button's text can be overwritten using this property. |
getEnabled |
Gets current value of property enabled. Disabled controls have different colors, depending on customer settings. Default value is |
getFileType |
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. Note: This property is not supported by Microsoft Edge. Example: |
getHeaderParameters |
Gets content of aggregation headerParameters. The header parameters for the |
getHttpRequestMethod |
Gets current value of property httpRequestMethod. Chosen HTTP request method for file upload. Default value is |
getIcon |
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 |
getIconFirst |
Gets current value of property iconFirst. If set to true (default), the display sequence is 1. icon 2. control text. Default value is |
getIconHovered |
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 |
getIconOnly |
Gets current value of property iconOnly. If set to true, the button is displayed without any text. Default value is |
getIconSelected |
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 |
getMaximumFilenameLength |
Gets current value of property maximumFilenameLength. The maximum length of a filename which the If the maximum filename length is exceeded, the corresponding event |
getMaximumFileSize |
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. |
sap.ui.unified.FileUploader.getMetadata |
Returns a metadata object for class sap.ui.unified.FileUploader. |
getMimeType |
Gets current value of property mimeType. The chosen files will be checked against an array of MIME types defined in this property. If at least one file does not fit the MIME type restriction, the upload is prevented. Note: This property is not supported by Internet Explorer. It is only reliable for common file types like images, audio, video, plain text and HTML documents. File types that are not recognized by the browser result in Example: |
getMultiple |
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 |
getName |
Gets current value of property name. Unique control name for identification on the server side after sending data to the server. |
getParameters |
Gets content of aggregation parameters. The parameters for the |
getPlaceholder |
Gets current value of property placeholder. Placeholder for the text field. |
getProcessedBlobsFromArray |
Allows to process Blobs before they get uploaded. This API can be used to create custom Blobs and upload these custom Blobs instead of the received/initials Blobs in the parameter This API is only supported in case This is a default implementation of the interface |
getSameFilenameAllowed |
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 |
getSendXHR |
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 |
getStyle |
Gets current value of property style. Style of the button. Values "Transparent, "Accept", "Reject", or "Emphasized" are allowed. |
getUploadOnChange |
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 |
getUploadUrl |
Gets current value of property uploadUrl. Used when URL address is on a remote server. Default value is |
getUseMultipart |
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 Default value is |
getValue |
Gets current value of property value. Value of the path for file upload. Default value is |
getValueState |
Gets current value of property valueState. Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success, None. Default value is |
getValueStateText |
Gets current value of property valueStateText. Custom text for the value state message pop-up. Note: If not specified, a default text, based on the value state type, will be used instead. |
getWidth |
Gets current value of property width. Specifies the displayed control width. Default value is |
getXhrSettings |
Gets content of aggregation xhrSettings. Settings for the |
indexOfHeaderParameter |
Checks for the provided |
indexOfParameter |
Checks for the provided |
insertHeaderParameter |
Inserts a headerParameter into the aggregation headerParameters. |
insertParameter |
Inserts a parameter into the aggregation parameters. |
removeAllAriaDescribedBy |
Removes all the controls in the association named ariaDescribedBy. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllHeaderParameters |
Removes all the controls from the aggregation headerParameters. Additionally, it unregisters them from the hosting UIArea. |
removeAllParameters |
Removes all the controls from the aggregation parameters. Additionally, it unregisters them from the hosting UIArea. |
removeAriaDescribedBy |
Removes an ariaDescribedBy from the association named ariaDescribedBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeHeaderParameter |
Removes a headerParameter from the aggregation headerParameters. |
removeParameter |
Removes a parameter from the aggregation parameters. |
setAdditionalData |
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 When called with a value of |
setButtonOnly |
Sets a new value for property buttonOnly. If set to "true", the When called with a value of Default value is |
setButtonText |
Sets a new value for property buttonText. The button's text can be overwritten using this property. When called with a value of |
setEnabled |
Sets a new value for property enabled. Disabled controls have different colors, depending on customer settings. When called with a value of Default value is |
setFileType |
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. Note: This property is not supported by Microsoft Edge. Example: When called with a value of |
setHttpRequestMethod |
Sets a new value for property httpRequestMethod. Chosen HTTP request method for file upload. When called with a value of Default value is |
setIcon |
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 Default value is |
setIconFirst |
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 Default value is |
setIconHovered |
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 Default value is |
setIconOnly |
Sets a new value for property iconOnly. If set to true, the button is displayed without any text. When called with a value of Default value is |
setIconSelected |
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 Default value is |
setMaximumFilenameLength |
Sets a new value for property maximumFilenameLength. The maximum length of a filename which the If the maximum filename length is exceeded, the corresponding event When called with a value of |
setMaximumFileSize |
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 |
setMimeType |
Sets a new value for property mimeType. The chosen files will be checked against an array of MIME types defined in this property. If at least one file does not fit the MIME type restriction, the upload is prevented. Note: This property is not supported by Internet Explorer. It is only reliable for common file types like images, audio, video, plain text and HTML documents. File types that are not recognized by the browser result in Example: When called with a value of |
setMultiple |
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 Default value is |
setName |
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 |
setPlaceholder |
Sets a new value for property placeholder. Placeholder for the text field. When called with a value of |
setSameFilenameAllowed |
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 Default value is |
setSendXHR |
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 Default value is |
setStyle |
Sets a new value for property style. Style of the button. Values "Transparent, "Accept", "Reject", or "Emphasized" are allowed. When called with a value of |
setUploadOnChange |
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 Default value is |
setUploadUrl |
Sets a new value for property uploadUrl. Used when URL address is on a remote server. When called with a value of Default value is |
setUseMultipart |
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 When called with a value of Default value is |
setValue |
Sets a new value for property value. Value of the path for file upload. When called with a value of Default value is |
setValueState |
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 Default value is |
setValueStateText |
Sets a new value for property valueStateText. Custom text for the value state message pop-up. Note: If not specified, a default text, based on the value state type, will be used instead. When called with a value of |
setWidth |
Sets a new value for property width. Specifies the displayed control width. When called with a value of Default value is |
setXhrSettings |
Sets the aggregated xhrSettings. |
upload |
Starts the upload (as defined by uploadUrl). |
Aborts the currently running upload.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeaderParameterName | string |
The name of the parameter within the Note: aborts the request, sent with a header parameter with the provided name. The parameter is taken into account if the sHeaderParameterValue parameter is provided too. |
|
sHeaderParameterValue | string |
The value of the parameter within the Note: aborts the request, sent with a header parameter with the provided value. The parameter is taken into account if the sHeaderParameterName parameter is provided too. |
Adds some ariaDescribedBy into the association ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to add; if empty, nothing is inserted |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some headerParameter to the aggregation headerParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderParameter | sap.ui.unified.FileUploaderParameter |
The headerParameter to add; if empty, nothing is inserted |
Adds some parameter to the aggregation parameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameter | sap.ui.unified.FileUploaderParameter |
The parameter to add; if empty, nothing is inserted |
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.
Note: Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the fileEmpty 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 the file is 0
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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
).
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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 event is only supported with property sendXHR
set to true, i.e. the event is not supported in Internet Explorer 9.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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 status
parameter for a value 2xx. The actual progress of the upload can be monitored by listening to the uploadProgress
event. However, this covers only the client side of the upload process and does not give any success status from the server.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
It 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 event is only supported with property sendXHR
set to true, i.e. the event is not supported in Internet Explorer 9.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Clears the content of the FileUploader
.
Note: The attached additional data however is retained.
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the fileEmpty event of this sap.ui.unified.FileUploader
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event change to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
newValue | string |
New file path value. |
|
files | object[] |
Files. |
Fires event fileAllowed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event fileEmpty to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of the file to be uploaded. |
Fires event filenameLengthExceed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The filename, which is longer than specified by the value of the property |
Fires event fileSizeExceed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of a file to be uploaded. |
|
fileSize | string |
The size in MB of a file to be uploaded. |
Fires event typeMissmatch to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of a file to be uploaded. |
|
fileType | string |
The file ending of a file to be uploaded. |
|
mimeType | string |
The MIME type of a file to be uploaded. |
Fires event uploadAborted to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of a file to be uploaded. |
|
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Fires event uploadComplete to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of a file to be uploaded. |
|
response | string |
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. |
|
readyStateXHR | string |
ReadyState of the XHR request. Required for receiving a |
|
status | string |
Status of the XHR request. Required for receiving a |
|
responseRaw | string |
Http-Response which comes from the server. Required for receiving This property is not supported by Internet Explorer 9. |
|
headers | object |
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 Required for receiving |
|
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Fires event uploadProgress to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
lengthComputable | boolean |
Indicates whether or not the relative upload progress can be calculated out of loaded and total. |
|
loaded | float |
The number of bytes of the file which have been uploaded by the time the event was fired. |
|
total | float |
The total size of the file to be uploaded in bytes. |
|
fileName | string |
The name of a file to be uploaded. |
|
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
Fires event uploadStart to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
fileName | string |
The name of a file to be uploaded. |
|
requestHeaders | object[] |
Http-Request-Headers. Required for receiving |
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 array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property buttonOnly.
If set to "true", the FileUploader
will be rendered as Button only, without showing the input field.
Default value is false
.
Gets current value of property buttonText.
The button's text can be overwritten using this property.
Gets current value of property enabled.
Disabled controls have different colors, depending on customer settings.
Default value is true
.
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. Note: This property is not supported by Microsoft Edge.
Example: ["jpg", "png", "bmp"]
.
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.
Gets current value of property httpRequestMethod.
Chosen HTTP request method for file upload.
Default value is Post
.
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 empty string
.
Gets current value of property iconFirst.
If set to true (default), the display sequence is 1. icon 2. control text.
Default value is true
.
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 empty string
.
Gets current value of property iconOnly.
If set to true, the button is displayed without any text.
Default value is false
.
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 empty string
.
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.
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 a metadata object for class sap.ui.unified.FileUploader.
Gets current value of property mimeType.
The chosen files will be checked against an array of MIME types defined in this property.
If at least one file does not fit the MIME type restriction, the upload is prevented.
Note: This property is not supported by Internet Explorer. It is only reliable for common file types like images, audio, video, plain text and HTML documents. File types that are not recognized by the browser result in file.type
to be returned as an empty string. In this case the verification could not be performed. The file upload is not prevented and the validation based on file type is left to the receiving backend side.
Example: ["image/png", "image/jpeg"]
.
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
.
Gets current value of property name.
Unique control name for identification on the server side after sending data to the server.
Gets content of aggregation parameters.
The parameters for the FileUploader
which are rendered as a hidden input field.
Allows to process Blobs before they get uploaded. This API can be used to create custom Blobs and upload these custom Blobs instead of the received/initials Blobs in the parameter aBlobs
. One use case could be to create and upload zip archives based on the passed Blobs. The default implementation of this API should simply resolve with the received Blobs (parameter aBlobs
).
This API is only supported in case sendXHR
is true
. This means only IE10+ is supported, while IE9 and below is not.
This is a default implementation of the interface sap.ui.unified.IProcessableBlobs
.
Param | Type | DefaultValue | Description |
---|---|---|---|
aBlobs | Blob[] |
The initial Blobs which can be used to determine/calculate a new array of Blobs for further processing. |
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
.
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
.
Gets current value of property style.
Style of the button.
Values "Transparent, "Accept", "Reject", or "Emphasized" are allowed.
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
.
Gets current value of property uploadUrl.
Used when URL address is on a remote server.
Default value is empty string
.
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
.
Gets current value of property value.
Value of the path for file upload.
Default value is empty string
.
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
.
Gets current value of property valueStateText.
Custom text for the value state message pop-up.
Note: If not specified, a default text, based on the value state type, will be used instead.
Gets current value of property width.
Specifies the displayed control width.
Default value is empty string
.
Gets content of aggregation xhrSettings.
Settings for the XMLHttpRequest
object. Note: This aggregation is only used when the sendXHR
property is set to true
.
Checks for the provided sap.ui.unified.FileUploaderParameter
in the aggregation headerParameters. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderParameter | sap.ui.unified.FileUploaderParameter |
The headerParameter whose index is looked for |
Checks for the provided sap.ui.unified.FileUploaderParameter
in the aggregation parameters. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameter | sap.ui.unified.FileUploaderParameter |
The parameter whose index is looked for |
Inserts a headerParameter into the aggregation headerParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeaderParameter | sap.ui.unified.FileUploaderParameter |
The headerParameter to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a parameter into the aggregation parameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameter | sap.ui.unified.FileUploaderParameter |
The parameter to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation headerParameters.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation parameters.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to be removed or its index or ID |
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a headerParameter from the aggregation headerParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
vHeaderParameter | int string sap.ui.unified.FileUploaderParameter |
The headerParameter to remove or its index or id |
Removes a parameter from the aggregation parameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParameter | int string sap.ui.unified.FileUploaderParameter |
The parameter to remove or its index or id |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAdditionalData | string |
New value for property |
Sets a new value for property buttonOnly.
If set to "true", the FileUploader
will be rendered as Button only, without showing the input field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bButtonOnly | boolean | false |
New value for property |
Sets a new value for property buttonText.
The button's 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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sButtonText | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnabled | boolean | true |
New value for property |
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. Note: This property is not supported by Microsoft Edge.
Example: ["jpg", "png", "bmp"]
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFileType | string[] |
New value for property |
Sets a new value for property httpRequestMethod.
Chosen HTTP request method for file upload.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Post
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHttpRequestMethod | sap.ui.unified.FileUploaderHttpRequestMethod | Post |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIcon | sap.ui.core.URI | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIconFirst | boolean | true |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconHovered | sap.ui.core.URI | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIconOnly | boolean | false |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconSelected | sap.ui.core.URI | '' |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaximumFilenameLength | int |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fMaximumFileSize | float |
New value for property |
Sets a new value for property mimeType.
The chosen files will be checked against an array of MIME types defined in this property.
If at least one file does not fit the MIME type restriction, the upload is prevented.
Note: This property is not supported by Internet Explorer. It is only reliable for common file types like images, audio, video, plain text and HTML documents. File types that are not recognized by the browser result in file.type
to be returned as an empty string. In this case the verification could not be performed. The file upload is not prevented and the validation based on file type is left to the receiving backend side.
Example: ["image/png", "image/jpeg"]
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMimeType | string[] |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMultiple | boolean | false |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPlaceholder | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSameFilenameAllowed | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSendXHR | boolean | false |
New value for property |
Sets a new value for property style.
Style of the button.
Values "Transparent, "Accept", "Reject", or "Emphasized" are allowed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sStyle | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUploadOnChange | boolean | false |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUploadUrl | sap.ui.core.URI | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUseMultipart | boolean | true |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string | '' |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueState | sap.ui.core.ValueState | None |
New value for property |
Sets a new value for property valueStateText.
Custom text for the value state message pop-up.
Note: If not specified, a default text, based on the value state type, will be used instead.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueStateText | string |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize | '' |
New value for property |
Sets the aggregated xhrSettings.
Param | Type | DefaultValue | Description |
---|---|---|---|
oXhrSettings | sap.ui.unified.FileUploaderXHRSettings |
The xhrSettings to set |
Starts the upload (as defined by uploadUrl).
Param | Type | DefaultValue | Description |
---|---|---|---|
bPreProcessFiles | boolean |
Set to |