C# Class Qiniu.Storage.UploadManager

上传管理器,可以通过该上传管理器自动判断上传的内容是 采用表单上传还是分片上传。 对于二进制数据和文件流,目前仅支持表单上传 对于沙盒文件,目前支持以表单方式和分片方式上传
Mostra file Open project: qiniu/csharp-sdk Class Usage Examples

Public Methods

Method Description
UploadManager ( ) : System

默认上传管理器

UploadManager ( ResumeRecorder recorder, KeyGenerator generator ) : System

以指定的分片上传进度记录器和分片上传记录文件名构建上传管理器 可以指定这两个参数来使分片上传支持断点续传功能

uploadData ( byte data, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void
uploadFile ( string filePath, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void
uploadStream ( Stream stream, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void

Private Methods

Method Description
DefaultUpCompletionHandler ( string key, Qiniu.Http.ResponseInfo respInfo, string respJson ) : void

Method Details

UploadManager() public method

默认上传管理器
public UploadManager ( ) : System
return System

UploadManager() public method

以指定的分片上传进度记录器和分片上传记录文件名构建上传管理器 可以指定这两个参数来使分片上传支持断点续传功能
public UploadManager ( ResumeRecorder recorder, KeyGenerator generator ) : System
recorder Qiniu.Storage.Persistent.ResumeRecorder 分片上传进度记录器
generator KeyGenerator 分片上传进度记录文件名
return System

uploadData() public method

public uploadData ( byte data, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void
data byte
key string
token string
uploadOptions Qiniu.Storage.UploadOptions
upCompletionHandler UpCompletionHandler
return void

uploadFile() public method

public uploadFile ( string filePath, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void
filePath string
key string
token string
uploadOptions Qiniu.Storage.UploadOptions
upCompletionHandler UpCompletionHandler
return void

uploadStream() public method

public uploadStream ( Stream stream, string key, string token, Qiniu.Storage.UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler ) : void
stream Stream
key string
token string
uploadOptions Qiniu.Storage.UploadOptions
upCompletionHandler UpCompletionHandler
return void