C# Class Qiniu.Storage.UploadManager

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

Méthodes publiques

Méthode 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

Méthode Description
DefaultUpCompletionHandler ( string key, Qiniu.Http.ResponseInfo respInfo, string respJson ) : void

Method Details

UploadManager() public méthode

默认上传管理器
public UploadManager ( ) : System
Résultat System

UploadManager() public méthode

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

uploadData() public méthode

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
Résultat void

uploadFile() public méthode

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
Résultat void

uploadStream() public méthode

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
Résultat void