Skip to content

Commit d843476

Browse files
committed
updated Docs
1 parent c28731f commit d843476

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Docs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
此 SDK 适用于 .NET4 及以上版本。
66

7-
SDK下载地址:[https://github.com/qiniu/csharp-sdk](https://github.com/qiniu/csharp-sdk)
7+
SDK下载地址:[https://github.com/qiniu/csharp-sdk/tags](https://github.com/qiniu/csharp-sdk/tags)
88

99

1010
**应用接入**
@@ -62,10 +62,10 @@ SDK下载地址:[https://github.com/qiniu/csharp-sdk](https://github.com/qiniu
6262

6363
// 首先定义资源表名
6464
string tableName = "tableName";
65-
65+
6666
// 然后获得签名认证
6767
DigestAuthClient conn = new DigestAuthClient();
68-
68+
6969
// 签名认证完成后,即可使用该认证来新建资源表
7070
RSService rs = new RSService(conn, tableName);
7171

@@ -94,25 +94,25 @@ SDK下载地址:[https://github.com/qiniu/csharp-sdk](https://github.com/qiniu
9494

9595
// 调用资源表对象的 PutFile() 方法进行文件上传
9696
PutFileRet putFileRet = rs.PutFile(key, mimeType, filePath, customMeta);
97-
97+
9898
##### 2. 客户端上传
99-
99+
100100
因为服务器端已经在之前进行过签名认证持有相应的安全凭证,因此可以直接进行上传。而由于客户端并不持有对RS的安全凭证,所以需要获取上传授权,从而得到一个有上传权限的URL,参见[获得上传授权](#rs-PutAuth)。在获得上传授权URL后,就可以开始上传文件了,示例代码如下:
101101

102102
// 在客户端上传文件之前,需要获得上传授权,得到经过授权的临时URL
103103
PutAuthRet putAuthRet = rs.PutAuth();
104104
uploadUrl = putAuthRet.Url;
105-
105+
106106
// 通过该临时 URL 进行文件上传
107-
PutFileRet putFileRet = RSClient.PutFile(uploadUrl, tableName, key, mimeType,
107+
PutFileRet putFileRet = RSClient.PutFile(uploadUrl, tableName, key, mimeType,
108108
filePath, customMeta, callbackParam);
109109

110110
<a name="rs-Stat"></a>
111111

112112
### 4. 获取已上传文件信息
113113

114114
您可以调用资源表对象的 Stat() 方法并传入一个 Key 来获取指定文件的相关信息。
115-
115+
116116
// 获取资源表中特定文件信息
117117
StatRet statRet = rs.Stat(key);
118118

0 commit comments

Comments
 (0)