13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/pf/cli/qiniu.rb', line 13
def push(filepath, bucket=nil)
qiniu = Profile.qiniu()
if bucket.nil?
bucket = qiniu.default_bucket
if bucket.nil?
puts "pass bucket name in command line, like 'pf qiniu push FILENAME BUCKET_NAME',"
"or set default qiniu bucket using 'pf qiniu default bucket BUCKET_NAME' before push"
return
end
end
account = qiniu.account()
if account.nil?
puts "You haven't add any qiniu accounts. Please add an qiniu account before push"
return
end
action = Action.new(account)
action.push(filepath, bucket)
end
|