mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 04:46:10 +10:00
Merge remote-tracking branch 'origin/master' into develop
Conflicts: docs/README.md
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
## CHANGE LOG
|
||||
|
||||
### v3.4.2
|
||||
|
||||
- `Qiniu::RS.generate_upload_token()` 方法新增 `:return_body` 选项。
|
||||
|
||||
该选项(`:return_body`)可设置文件上传成功后,执行七牛云存储规定的回调API,并以 JSON 响应格式返回其执行结果。参考 [uploadToken 之 returnBody 说明](http://docs.qiniutek.com/v3/api/io/#uploadToken-returnBody)。
|
||||
|
||||
### v3.4.1
|
||||
|
||||
增加为上传文件进行预转的选项,参见 [uploadToken 之 asyncOps 说明](http://docs.qiniutek.com/v3/api/io/#uploadToken-asyncOps)
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
qiniu-rs (3.4.1)
|
||||
qiniu-rs (3.4.2)
|
||||
json (~> 1.7)
|
||||
mime-types (~> 1.19)
|
||||
rest-client (~> 1.6)
|
||||
@@ -13,7 +13,7 @@ GEM
|
||||
diff-lcs (1.1.3)
|
||||
fakeweb (1.3.0)
|
||||
json (1.7.6)
|
||||
mime-types (1.19)
|
||||
mime-types (1.20.1)
|
||||
rake (10.0.3)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
@@ -24,7 +24,7 @@ GEM
|
||||
rspec-core (2.12.2)
|
||||
rspec-expectations (2.12.1)
|
||||
diff-lcs (~> 1.1.3)
|
||||
rspec-mocks (2.12.1)
|
||||
rspec-mocks (2.12.2)
|
||||
ruby-hmac (0.4.0)
|
||||
|
||||
PLATFORMS
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
## 许可证
|
||||
|
||||
Copyright (c) 2012 qiniutek.com
|
||||
Copyright (c) 2012-2013 qiniutek.com
|
||||
|
||||
基于 MIT 协议发布:
|
||||
|
||||
|
||||
+7
-9
@@ -323,10 +323,10 @@ title: Ruby SDK
|
||||
**参数**
|
||||
|
||||
expires_in
|
||||
: 可选,数字类型,用于设置上传 URL 的有效期,单位:秒,缺省为 3600 秒,即 1 小时后该上传链接不再有效。
|
||||
: 可选,数字类型,用于设置上传 URL 的有效期,单位:秒,缺省为 3600 秒,即 1 小时后该下载授权凭证(downloadToken)不再有效。
|
||||
|
||||
pattern
|
||||
: 可选,字符串类型,用于设置可匹配的下载链接。参考:[downloadToken pattern 详解](http://docs.qiniu.com/api/get.html#download-token-pattern)
|
||||
: 可选,字符串类型,用于设置可匹配的下载链接。参考:[downloadToken pattern 详解](http://docs.qiniutek.com/v3/api/io/#download-token-pattern)
|
||||
|
||||
|
||||
<a name="other-download-features"></a>
|
||||
@@ -756,11 +756,9 @@ mogrify_options
|
||||
thumbnail = Qiniu::RS.get(target_bucket, target_key)
|
||||
puts thumbnail["url"]
|
||||
|
||||
# 您可以选择将存放缩略图的 bucket 公开,这样就可以直接以外链的形式访问到缩略图,而不用走API获取下载URL。
|
||||
result = Qiniu::RS.publish("pic.example.com", target_bucket)
|
||||
# 您可以选择将存放缩略图的 bucket 公开,这样就可以直接以外链的形式访问到缩略图,而不用走API获取下载URL,就可以直接以如下方式访问缩略图:
|
||||
|
||||
# 然后将 pic.example.com CNAME 到 iovip.qbox.me ,就可以直接以如下方式访问缩略图
|
||||
# [GET] http://pic.example.com/<target_key>
|
||||
# [GET] http://<bucket>.qiniudn.com/<target_key>
|
||||
end
|
||||
|
||||
|
||||
@@ -768,10 +766,10 @@ mogrify_options
|
||||
|
||||
## 贡献代码
|
||||
|
||||
七牛云存储 Ruby SDK 源码地址:[https://github.com/qiniu/ruby-sdk](https://github.com/qiniu/ruby-sdk)
|
||||
七牛云存储 Ruby SDK 源码地址:<https://github.com/qiniu/ruby-sdk>
|
||||
|
||||
1. 登录 [github.com](https://github.com)
|
||||
2. Fork [https://github.com/qiniu/ruby-sdk](https://github.com/qiniu/ruby-sdk)
|
||||
1. 登录 <https://github.com>
|
||||
2. Fork <https://github.com/qiniu/ruby-sdk>
|
||||
3. 创建您的特性分支 (`git checkout -b my-new-feature`)
|
||||
4. 提交您的改动 (`git commit -am 'Added some feature'`)
|
||||
5. 将您的改动记录提交到远程 `git` 仓库 (`git push origin my-new-feature`)
|
||||
|
||||
@@ -5,7 +5,7 @@ module Qiniu
|
||||
module Version
|
||||
MAJOR = 3
|
||||
MINOR = 4
|
||||
PATCH = 1
|
||||
PATCH = 2
|
||||
# Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
|
||||
#
|
||||
# Example
|
||||
|
||||
Reference in New Issue
Block a user