Bitrix API

UploadFileManager extends UploadFileManager

Table of Contents

Constants

DEFAULT_CHUNK_SIZE  = 5242880
ERROR_CHUNK_ERROR  = 'DISK_UPL_M_22001'
ERROR_CREATE_TMP_FILE_BUCKET  = 'DISK_UPL_M_22002'
ERROR_CREATE_TMP_FILE_LAST_HERO  = 'DISK_UPL_M_22005'
ERROR_CREATE_TMP_FILE_NON_BUCKET  = 'DISK_UPL_M_22003'
ERROR_EMPTY_TOKEN  = 'DISK_UPL_M_22004'
ERROR_UNKNOWN_TOKEN  = 'DISK_UPL_M_22006'

Methods

__construct()  : mixed
findUserSpecificTmpFileByToken()  : TmpFile|null
getChunkSize()  : int
Returns size for chunk-upload.
getContentRange()  : array<string|int, mixed>
getEntry()  : Entry
getErrorByCode()  : array<string|int, Error>
Getting once error with the necessary code.
getErrors()  : array<string|int, Error>
Getting array of errors.
getErrorsByCode()  : array<string|int, Error>
Getting array of errors with the necessary code.
getFileSize()  : int
getToken()  : string
getUserId()  : int
removeIrrelevant()  : string
Remove irrelevant tmp files.
rollbackByToken()  : bool
Rollback upload by token. Destroy temporary content.
setContentRange()  : $this
setEntry()  : $this
setFileSize()  : $this
setTmpFileClass()  : UploadFileManager
setToken()  : $this
setUser()  : $this
setUserId()  : $this
upload()  : mixed

Constants

ERROR_CREATE_TMP_FILE_BUCKET

public mixed ERROR_CREATE_TMP_FILE_BUCKET = 'DISK_UPL_M_22002'

ERROR_CREATE_TMP_FILE_LAST_HERO

public mixed ERROR_CREATE_TMP_FILE_LAST_HERO = 'DISK_UPL_M_22005'

ERROR_CREATE_TMP_FILE_NON_BUCKET

public mixed ERROR_CREATE_TMP_FILE_NON_BUCKET = 'DISK_UPL_M_22003'

Methods

getChunkSize()

Returns size for chunk-upload.

public getChunkSize(string $filename, int $fileSize) : int
Parameters
$filename : string

Filename.

$fileSize : int

Size of file in bytes

Return values
int

getContentRange()

public getContentRange() : array<string|int, mixed>
Return values
array<string|int, mixed>

getErrorByCode()

Getting once error with the necessary code.

public getErrorByCode(mixed $code) : array<string|int, Error>
Parameters
$code : mixed

Code of error.

Tags
inheritdoc
Return values
array<string|int, Error>

getErrorsByCode()

Getting array of errors with the necessary code.

public getErrorsByCode(mixed $code) : array<string|int, Error>
Parameters
$code : mixed

Code of error.

Tags
inheritdoc
Return values
array<string|int, Error>

removeIrrelevant()

Remove irrelevant tmp files.

public static removeIrrelevant() : string
Return values
string

rollbackByToken()

Rollback upload by token. Destroy temporary content.

public rollbackByToken() : bool
Return values
bool

Status of delete.

setContentRange()

public setContentRange(array<string|int, mixed> $contentRange) : $this
Parameters
$contentRange : array<string|int, mixed>
Return values
$this

setFileSize()

public setFileSize(int $fileSize) : $this
Parameters
$fileSize : int
Return values
$this

setToken()

public setToken(string $token) : $this
Parameters
$token : string
Return values
$this

setUser()

public setUser(CUser|User|int $user) : $this
Parameters
$user : CUser|User|int
Return values
$this

setUserId()

public setUserId(int $userId) : $this
Parameters
$userId : int
Return values
$this

upload()

public upload(mixed $filename, array<string|int, mixed> $fileData) : mixed
Parameters
$filename : mixed
$fileData : array<string|int, mixed>

        
On this page

Search results