new module:crm/FileManager()
Methods
formatFileSize(size) → {String}
Formats the file size formatted in KB.
Parameters:
Name | Type | Description |
---|---|---|
size |
Number |
Returns:
- Type
- String
getFile(fileUrl, responseType, onSuccess)
Loads a remote file.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
fileUrl |
String | |||||||
responseType |
String | |||||||
onSuccess |
function |
Properties
|
isFileSizeAllowed() → {Boolean}
Checks the crm.Application's maxFileSize to determine if the file size being added exeeds this limit.
Parameters:
Type | Description |
---|---|
Array |
Returns:
- Type
- Boolean
uploadFile(file, url, progress, complete, error, scope, asPut)
Uploads a file to a URL.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
file |
File | |||||||
url |
String | |||||||
progress |
function | Progress callback Properties
|
||||||
complete |
function | Complete callback Properties
|
||||||
error |
function | Error callback Properties
|
||||||
scope |
Object | |||||||
asPut |
Boolean |