Class: FileUpload

OC.FileUpload(uploader, data)

Represents a file upload

Constructor

new FileUpload(uploader, data)

File upload object
Parameters:
Name Type Description
uploader OC.Uploader uploader
data Object blueimp data
Source:

Members

$uploadEl :Object

Upload element
Type:
  • Object
Source:

_conflictMode :int

Type:
Source:

_newName :String

New name from server after autorename
Type:
  • String
Source:

_targetFolder :string

Target folder
Type:
Source:

id :string

Unique upload id
Type:
Source:

Methods

abort()

Abort the upload
Source:

autoRename()

Trigger autorename and append "(2)". Multiple calls will increment the appended number.
Source:

done()

Process end of transfer
Source:

fail()

Fail the upload
Source:

getConflictMode() → {int}

Returns conflict resolution mode.
Source:
Returns:
conflict mode
Type
int

getFile() → {File}

Returns the file to be uploaded
Source:
Returns:
file
Type
File

getFileName() → {String}

Return the final filename.
Source:
Returns:
file name
Type
String

getFullFilePath() → {String}

Get full path for the target file, including relative path and file name.
Source:
Returns:
full path
Type
String

getFullPath() → {String}

Get full path for the target file, including relative path, without the file name.
Source:
Returns:
full path
Type
String

getId()

Returns the unique upload id
Source:
Returns:
string

getResponse() → {Object}

Returns the server response
Source:
Returns:
response
Type
Object

getResponseHeader(headerName) → {Array|String}

Returns the response header by name
Parameters:
Name Type Description
headerName String header name
Source:
Returns:
response header value(s)
Type
Array | String

getResponseStatus() → {int}

Returns the status code from the response
Source:
Returns:
status code
Type
int

setConflictMode(mode)

Set conflict resolution mode. See CONFLICT_MODE_* constants.
Parameters:
Name Type Description
mode int conflict mode
Source:

submit()

Submit the upload
Source: