mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-25 04:36:40 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cf75eecbd | ||
|
|
ccd46828c6 |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
qiniu-rs (2.0.4)
|
qiniu-rs (2.0.5)
|
||||||
json (~> 1.7.3)
|
json (~> 1.7.3)
|
||||||
mime-types (~> 1.19)
|
mime-types (~> 1.19)
|
||||||
rest-client (~> 1.6.7)
|
rest-client (~> 1.6.7)
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ module Qiniu
|
|||||||
end
|
end
|
||||||
|
|
||||||
def put_file(url, local_file, bucket = nil, key = nil, mime_type = nil, custom_meta = nil, callback_params = nil, enable_crc32_check = false)
|
def put_file(url, local_file, bucket = nil, key = nil, mime_type = nil, custom_meta = nil, callback_params = nil, enable_crc32_check = false)
|
||||||
raise NoSuchFileError unless File.exist?(local_file)
|
raise NoSuchFileError, local_file unless File.exist?(local_file)
|
||||||
key = Digest::SHA1.hexdigest(local_file + Time.now.to_s) if key.nil?
|
key = Digest::SHA1.hexdigest(local_file + Time.now.to_s) if key.nil?
|
||||||
entry_uri = bucket + ':' + key
|
entry_uri = bucket + ':' + key
|
||||||
if mime_type.nil?
|
if mime_type.nil?
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
module Qiniu
|
module Qiniu
|
||||||
module RS
|
module RS
|
||||||
VERSION = "2.0.4"
|
VERSION = "2.0.5"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user