Constants

DEFAULT_CONCURRENT_TASK_NUMBER

DEFAULT_CONCURRENT_TASK_NUMBER = 3

Properties

$timeoutMs

$timeoutMs : 

Type

$maxRetryCount

$maxRetryCount : 

Type

$errorCode

$errorCode : 

Type

$errorMessage

$errorMessage : 

Type

$requestId

$requestId : 

Type

$signature

$signature : 

Type

$srcFpath

$srcFpath : 

Type

$url

$url : 

Type

$fileSize

$fileSize : 

Type

$sliceSize

$sliceSize : 

Type

$session

$session : 

Type

$concurrentTaskNumber

$concurrentTaskNumber : 

Type

$offset

$offset : 

Type

$libcurlWrapper

$libcurlWrapper : 

Type

$accessUrl

$accessUrl : 

Type

$resourcePath

$resourcePath : 

Type

$sourceUrl

$sourceUrl : 

Type

Methods

__construct()

__construct(  $timeoutMs,   $maxRetryCount) 

timeoutMs: max timeout in milliseconds for each http request.

maxRetryCount: max retry count for uploading each slice on error.

Parameters

$timeoutMs
$maxRetryCount

__destruct()

__destruct() 

getLastErrorCode()

getLastErrorCode() 

getLastErrorMessage()

getLastErrorMessage() 

getRequestId()

getRequestId() 

getAccessUrl()

getAccessUrl() 

getResourcePath()

getResourcePath() 

getSourceUrl()

getSourceUrl() 

initUploading()

initUploading(  $signature,   $srcFpath,   $url,   $fileSize,   $sliceSize,   $bizAttr,   $insertOnly) 

Return true on success and return false on failure.

Parameters

$signature
$srcFpath
$url
$fileSize
$sliceSize
$bizAttr
$insertOnly

performUploading()

performUploading() 

Return true on success and return false on failure.

finishUploading()

finishUploading() 

Return true on success and return false on failure.

uploadCallback()

uploadCallback(  $request,   $response) 

Parameters

$request
$response

sendRequest()

sendRequest(  $request) 

Parameters

$request

clearError()

clearError() 

setError()

setError(  $errorCode,   $errorMessage) 

Parameters

$errorCode
$errorMessage