samples/baidubce/bos_sample.rb in baidubce-sdk-0.9.3 vs samples/baidubce/bos_sample.rb in baidubce-sdk-0.9.4
- old
+ new
@@ -17,12 +17,12 @@
include Baidubce
# debug
credentials = Auth::BceCredentials.new(
- # "your ak",
- # "your sk"
+ # "your ak",
+ # "your sk"
)
conf = BceClientConfiguration.new(
credentials,
"http://bj.bcebos.com"
@@ -174,10 +174,9 @@
options = { Http::CONTENT_TYPE => 'string',
"key1" => "value1",
'Content-Disposition' => 'inline',
'user-metadata' => user_metadata
}
-
client.put_object_from_string(bucket_name, "obj.txt", "obj", options)
puts client.get_object_as_string(bucket_name, "obj.txt")
puts client.get_object_to_file(bucket_name, "obj.txt", "obj_file.txt")
# put cold storage class object