Class: FileManager

FileManager()

Methods

formatFileSize(size) → {String}

Formats the file size formatted in KB.
Parameters:
Name Type Description
size Number
Source:
Returns:
Type
String

getFile(fileUrl, responseType, onSuccess)

Loads a remote file.
Parameters:
Name Type Description
fileUrl String
responseType String
onSuccess function
Properties
Name Type Description
responseInfo Object
Source:

isFileSizeAllowed() → {Boolean}

Checks the crm.Application's maxFileSize to determine if the file size being added exeeds this limit.
Parameters:
Type Description
Array
Source:
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
Name Type Description
e Event
complete function Complete callback
Properties
Name Type Description
request Object
error function Error callback
Properties
Name Type Description
errorText function
scope Object
asPut Boolean
Source:

FileManager()

Methods

formatFileSize(size) → {String}

Formats the file size formatted in KB.
Parameters:
Name Type Description
size Number
Source:
Returns:
Type
String

getFile(fileUrl, responseType, onSuccess)

Loads a remote file.
Parameters:
Name Type Description
fileUrl String
responseType String
onSuccess function
Properties
Name Type Description
responseInfo Object
Source:

isFileSizeAllowed() → {Boolean}

Checks the crm.Application's maxFileSize to determine if the file size being added exeeds this limit.
Parameters:
Type Description
Array
Source:
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
Name Type Description
e Event
complete function Complete callback
Properties
Name Type Description
request Object
error function Error callback
Properties
Name Type Description
errorText function
scope Object
asPut Boolean
Source: