Sha256: ad9bdaa3c83211eea89e41068856c8de6f3d7339fa9b2bd2c5933a19430c9c31
Contents?: true
Size: 627 Bytes
Versions: 2
Compression:
Stored size: 627 Bytes
Contents
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $:.unshift(File.dirname(__FILE__)) require 'rubygems' require 'ncmb' require 'yaml' require 'open-uri' yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml')) NCMB.initialize application_key: yaml['application_key'], client_key: yaml['client_key'] f = NCMB::NFile.new('http://mb.cloud.nifty.com/assets/images/logo.png') f.acl.public('read', true) f.acl.public('write', true) f.fileName = "test.png" f.save() puts "Uploaded" f.file = 'http://k.yimg.jp/images/top/sp2/cmn/logo-ns_d_131205.png' f.update() puts "Updated" f.delete() puts "Deleted"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ncmb-ruby-client-0.1.2 | examples/file_test.rb |
ncmb-ruby-client-0.1.1 | examples/file_test.rb |