Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: ruby
rvm:
- 1.9.2
- 1.9.3
- 2.0
- 2.1
Expand Down
7 changes: 2 additions & 5 deletions lib/aliyun/oss/bucket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ def list_objects(opts = {})
# @option opts [Hash] :metas 设置object的meta,这是一些用户自定
# 义的属性,它们会和object一起存储,在{#get_object}的时候会
# 返回这些meta。属性的key不区分大小写。例如:{ 'year' => '2015' }
# @yield [HTTP::StreamWriter] 如果调
# 用的时候传递了block,则写入到object的数据由block指定
# @yield [HTTP::StreamWriter] 如果调用的时候传递了block,则写入
# 到object的数据由block指定
# @example 流式上传数据
# put_object('x'){ |stream| 100.times { |i| stream << i.to_s } }
# put_object('x'){ |stream| stream << get_data }
Expand All @@ -188,9 +188,6 @@ def list_objects(opts = {})
# @example 指定Content-Type和metas
# put_object('x', :file => '/tmp/x', :content_type => 'text/html',
# :metas => {'year' => '2015', 'people' => 'mary'})
# @note 采用streaming的方式时,提供的数据必须是有结束标记的数据。
# 因为put_object会不断地从StreamWriter中读取数据上传到OSS,直到
# 它读到的数据为nil停止。
# @note 如果opts中指定了:file,则block会被忽略
def put_object(key, opts = {}, &block)
args = opts.dup
Expand Down