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 |
Returns a metadata object for class sap.ui.unified.FileUploader.
Returns:
abort(): void
Aborts the currently running upload.
- Since:
- 1.24.0
Adds some headerParameter to the aggregation headerParameters
.
Parameters:
Returns:
Adds some parameter to the aggregation parameters
.
Parameters:
- Since:
- 1.12.2
Returns:
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:
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:
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:
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:
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:
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:
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:
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:
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:
clear(): void
Clears the content of the FileUploader. The attached additional data however is retained.
- Since:
- 1.25.0
Destroys all the headerParameters in the aggregation headerParameters
.
Returns:
Destroys all the parameters in the aggregation parameters
.
- Since:
- 1.12.2
Returns:
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:
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:
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:
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:
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:
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:
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:
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:
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:
Fires event
change
to attached listeners.
Expects the following event parameters:
newValue
of type string
New file path value.files
of type object[]
Files.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event fileAllowed
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
filenameLengthExceed
to attached listeners.
Expects the following event parameters:
fileName
of type string
The 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:
Fires event
fileSizeExceed
to attached listeners.
Expects the following event parameters:
fileName
of type string
The name of a file to be uploaded.fileSize
of type string
The size in MB of a file to be uploaded.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
typeMissmatch
to attached listeners.
Expects the following event parameters:
fileName
of type string
The name of a file to be uploaded.fileType
of type string
The file ending of a file to be uploaded.mimeType
of type string
The MIME type of a file to be uploaded.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
uploadAborted
to attached listeners.
Expects the following event parameters:
fileName
of type string
The 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:
Fires event
uploadComplete
to attached listeners.
Expects the following event parameters:
fileName
of type string
The name of a file to be uploaded.response
of type 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
of type string
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.status
of type string
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.responseRaw
of type string
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.headers
of type 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 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:
Fires event
uploadProgress
to attached listeners.
Expects the following event parameters:
lengthComputable
of type boolean
Indicates whether or not the relative upload progress can be calculated out of loaded and total.loaded
of type float
The number of bytes of the file which have been uploaded by to the time the event was fired.total
of type float
The total size of the file to be uploaded in byte.fileName
of type string
The 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:
Fires event
uploadStart
to attached listeners.
Expects the following event parameters:
fileName
of type string
The 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:
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 |
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:
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:
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 |
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:
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 |
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:
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:
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 |
Gets current value of property
uploadUrl
.
Used when URL address is on a remote server.
Default value is
.
Returns:
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 |
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:
Gets current value of property
width
.
Specifies the displayed control width.
Default value is
.
Returns:
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:
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:
- Since:
- 1.12.2
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
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:
Removes all the controls from the aggregation
headerParameters
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes all the controls from the aggregation
parameters
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.12.2
Returns:
Removes a headerParameter from the aggregation headerParameters
.
Parameters:
Returns:
Removes a parameter from the aggregation parameters
.
Parameters:
- Since:
- 1.12.2
Returns:
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:
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:
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:
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:
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:
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:
- Since:
- 1.26.0
Returns:
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:
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:
- Since:
- 1.26.0
Returns:
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:
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:
- Since:
- 1.26.0
Returns:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
Returns:
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:
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:
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:
- Since:
- 1.24.0
Returns:
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:
Returns:
upload(): void
Starts the upload (as defined by uploadUrl)