Skip to content

Commit 9d96bed

Browse files
committed
Merge pull request #71 from longshanksmo/develop
add warning of utf8 keys
2 parents ba985bf + 5239a21 commit 9d96bed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/README.gist.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Python-SDK可以使用`pip`或`easy_install`从PyPI服务器上安装,但不
158158
@gist(../qiniu/rs/rs_token.py#PutPolicy)
159159
```
160160

161-
* `scope` 限定客户端的权限。如果 `scope` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 `scope` 为 bucket:key,则客户端可以修改指定的文件。
161+
* `scope` 限定客户端的权限。如果 `scope` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 `scope` 为 bucket:key,则客户端可以修改指定的文件。**注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
162162
* `callbackUrl` 设定业务服务器的回调地址,这样业务服务器才能感知到上传行为的发生。
163163
* `callbackBody` 设定业务服务器的回调信息。文件上传成功后,七牛向业务服务器的callbackUrl发送的POST请求携带的数据。支持 [魔法变量](http://docs.qiniu.com/api/put.html#MagicVariables)[自定义变量](http://docs.qiniu.com/api/put.html#xVariables)
164164
* `returnUrl` 设置用于浏览器端文件上传成功后,浏览器执行301跳转的URL,一般为 HTML Form 上传时使用。文件上传成功后浏览器会自动跳转到 `returnUrl?upload_ret=returnBody`
@@ -269,6 +269,8 @@ ret是一个字典,含有`hash`,`key`等信息。
269269

270270
假设某个 bucket 既绑定了七牛的二级域名,如 hello.qiniudn.com,也绑定了自定义域名(需要备案),如 hello.com。那么该 bucket 中 key 为 a/b/c.htm 的文件可以通过 http://hello.qiniudn.com/a/b/c.htmhttp://hello.com/a/b/c.htm 中任意一个 url 进行访问。
271271

272+
**注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
273+
272274
<a name="io-get-private"></a>
273275

274276
#### 下载私有文件

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class PutPolicy(object):
172172
self.scope = scope
173173
```
174174

175-
* `scope` 限定客户端的权限。如果 `scope` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 `scope` 为 bucket:key,则客户端可以修改指定的文件。
175+
* `scope` 限定客户端的权限。如果 `scope` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 `scope` 为 bucket:key,则客户端可以修改指定的文件。**注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
176176
* `callbackUrl` 设定业务服务器的回调地址,这样业务服务器才能感知到上传行为的发生。
177177
* `callbackBody` 设定业务服务器的回调信息。文件上传成功后,七牛向业务服务器的callbackUrl发送的POST请求携带的数据。支持 [魔法变量](http://docs.qiniu.com/api/put.html#MagicVariables)[自定义变量](http://docs.qiniu.com/api/put.html#xVariables)
178178
* `returnUrl` 设置用于浏览器端文件上传成功后,浏览器执行301跳转的URL,一般为 HTML Form 上传时使用。文件上传成功后浏览器会自动跳转到 `returnUrl?upload_ret=returnBody`
@@ -330,6 +330,8 @@ print ret,
330330

331331
假设某个 bucket 既绑定了七牛的二级域名,如 hello.qiniudn.com,也绑定了自定义域名(需要备案),如 hello.com。那么该 bucket 中 key 为 a/b/c.htm 的文件可以通过 http://hello.qiniudn.com/a/b/c.htmhttp://hello.com/a/b/c.htm 中任意一个 url 进行访问。
332332

333+
**注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
334+
333335
<a name="io-get-private"></a>
334336

335337
#### 下载私有文件

0 commit comments

Comments
 (0)