File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ Python-SDK可以使用`pip`或`easy_install`从PyPI服务器上安装,但不
158
158
@gist(../qiniu/rs/rs_token.py#PutPolicy)
159
159
```
160
160
161
- * ` scope ` 限定客户端的权限。如果 ` scope ` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 ` scope ` 为 bucket: key ,则客户端可以修改指定的文件。
161
+ * ` scope ` 限定客户端的权限。如果 ` scope ` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 ` scope ` 为 bucket: key ,则客户端可以修改指定的文件。** 注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误 **
162
162
* ` callbackUrl ` 设定业务服务器的回调地址,这样业务服务器才能感知到上传行为的发生。
163
163
* ` callbackBody ` 设定业务服务器的回调信息。文件上传成功后,七牛向业务服务器的callbackUrl发送的POST请求携带的数据。支持 [ 魔法变量] ( http://docs.qiniu.com/api/put.html#MagicVariables ) 和 [ 自定义变量] ( http://docs.qiniu.com/api/put.html#xVariables ) 。
164
164
* ` returnUrl ` 设置用于浏览器端文件上传成功后,浏览器执行301跳转的URL,一般为 HTML Form 上传时使用。文件上传成功后浏览器会自动跳转到 ` returnUrl?upload_ret=returnBody ` 。
@@ -269,6 +269,8 @@ ret是一个字典,含有`hash`,`key`等信息。
269
269
270
270
假设某个 bucket 既绑定了七牛的二级域名,如 hello.qiniudn.com,也绑定了自定义域名(需要备案),如 hello.com。那么该 bucket 中 key 为 a/b/c.htm 的文件可以通过 http://hello.qiniudn.com/a/b/c.htm 或 http://hello.com/a/b/c.htm 中任意一个 url 进行访问。
271
271
272
+ ** 注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
273
+
272
274
<a name =" io-get-private " ></a >
273
275
274
276
#### 下载私有文件
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ class PutPolicy(object):
172
172
self.scope = scope
173
173
```
174
174
175
- * ` scope ` 限定客户端的权限。如果 ` scope ` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 ` scope ` 为 bucket: key ,则客户端可以修改指定的文件。
175
+ * ` scope ` 限定客户端的权限。如果 ` scope ` 是 bucket,则客户端只能新增文件到指定的 bucket,不能修改文件。如果 ` scope ` 为 bucket: key ,则客户端可以修改指定的文件。** 注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误 **
176
176
* ` callbackUrl ` 设定业务服务器的回调地址,这样业务服务器才能感知到上传行为的发生。
177
177
* ` callbackBody ` 设定业务服务器的回调信息。文件上传成功后,七牛向业务服务器的callbackUrl发送的POST请求携带的数据。支持 [ 魔法变量] ( http://docs.qiniu.com/api/put.html#MagicVariables ) 和 [ 自定义变量] ( http://docs.qiniu.com/api/put.html#xVariables ) 。
178
178
* ` returnUrl ` 设置用于浏览器端文件上传成功后,浏览器执行301跳转的URL,一般为 HTML Form 上传时使用。文件上传成功后浏览器会自动跳转到 ` returnUrl?upload_ret=returnBody ` 。
@@ -330,6 +330,8 @@ print ret,
330
330
331
331
假设某个 bucket 既绑定了七牛的二级域名,如 hello.qiniudn.com,也绑定了自定义域名(需要备案),如 hello.com。那么该 bucket 中 key 为 a/b/c.htm 的文件可以通过 http://hello.qiniudn.com/a/b/c.htm 或 http://hello.com/a/b/c.htm 中任意一个 url 进行访问。
332
332
333
+ ** 注意: key必须采用utf8编码,如使用非utf8编码访问七牛云存储将反馈错误**
334
+
333
335
<a name =" io-get-private " ></a >
334
336
335
337
#### 下载私有文件
You can’t perform that action at this time.
0 commit comments