C# Class Qiniu.Storage.ResumeUploader

文件分片上传
Exibir arquivo Open project: qiniu/csharp-sdk Class Usage Examples

Public Methods

Method Description
ResumeUploader ( ResumeRecorder recorder, string recordKey, Stream stream, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : System
ResumeUploader ( ResumeRecorder recorder, string recordKey, string filePath, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : System

构建分片上传对象

uploadFile ( ) : void
uploadStream ( ) : void

Private Methods

Method Description
calcBPutChunkSize ( long offset ) : int
calcMakeBlockSize ( long offset ) : int
isCancelled ( ) : bool
makeBlock ( string upHost, long offset, int blockSize, int chunkSize, ProgressHandler progressHandler, CompletionHandler completionHandler ) : void
makeFile ( string upHost, CompletionHandler completionHandler ) : void
nextTask ( long offset, int retried, string upHost ) : void
putChunk ( string upHost, long offset, int chunkSize, string context, ProgressHandler progressHandler, CompletionHandler completionHandler ) : void
record ( long offset ) : void
recoveryFromResumeRecord ( ) : long
removeRecord ( ) : void

Method Details

ResumeUploader() public method

public ResumeUploader ( ResumeRecorder recorder, string recordKey, Stream stream, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : System
recorder Qiniu.Storage.Persistent.ResumeRecorder
recordKey string
stream Stream
key string
token string
uploadOptions Qiniu.Storage.UploadOptions
upCompletionHandler UpCompletionHandler
return System

ResumeUploader() public method

构建分片上传对象
public ResumeUploader ( ResumeRecorder recorder, string recordKey, string filePath, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : System
recorder Qiniu.Storage.Persistent.ResumeRecorder 分片上传进度记录器
recordKey string 分片上传进度记录文件名
filePath string 上传的文件全路径
key string 保存在七牛的文件名
token string 上传凭证
uploadOptions Qiniu.Storage.UploadOptions 上传可选设置
upCompletionHandler UpCompletionHandler 上传完成结果处理器
return System

uploadFile() public method

public uploadFile ( ) : void
return void

uploadStream() public method

public uploadStream ( ) : void
return void