Namespace: Upload

OC.Upload

keeps track of uploads in progress and implements callbacks for the conflicts dialog
Source:

Methods

(static) _isReceivedSharedFile(file) → {bool}

Returns whether the given file is known to be a received shared file
Parameters:
Name Type Description
file Object file
Source:
Returns:
true if the file is a shared file
Type
bool

(static) cancelUploads()

cancels all uploads
Source:

(static) checkExistingFiles(selection, callbacks)

checks the list of existing files prior to uploading and shows a simple dialog to choose skip all, replace all or choose which files to keep
Parameters:
Name Type Description
selection array of files to upload
callbacks object object with several callback methods
Properties
Name Type Description
onNoConflicts function
onSkipConflicts function
onReplaceConflicts function
onChooseConflicts function
onCancel function
Source:

(static) deleteUpload(data)

deletes the jqHXR object from a data selection
Parameters:
Name Type Description
data object
Source:

(static) isProcessing() → {boolean}

Checks the currently known uploads. returns true if any hxr has the state 'pending'
Source:
Returns:
Type
boolean

(static) onAutorename(data)

handle uploading a file and letting the server decide a new name
Parameters:
Name Type Description
data object
Source:

(static) onCancel(data)

callback for the conflicts dialog
Parameters:
Name Type Description
data object
Source:

(static) onContinue(conflicts)

callback for the conflicts dialog calls onSkip, onReplace or onAutorename for each conflict
Parameters:
Name Type Description
conflicts object list of conflict elements
Source:

(static) onReplace(data)

handle replacing a file on the server with an uploaded file
Parameters:
Name Type Description
data object
Source:

(static) onSkip(data)

handle skipping an upload
Parameters:
Name Type Description
data object
Source: