upyun-rb 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/upyun-rb/bucket.rb +1 -1
- data/lib/upyun-rb/version.rb +1 -1
- metadata +1 -1
data/lib/upyun-rb/bucket.rb
CHANGED
@@ -30,7 +30,7 @@ module Upyun
|
|
30
30
|
def put(path, file)
|
31
31
|
uri = "/#{@bucket}/#{path}"
|
32
32
|
date = Upyun::Util.current_date
|
33
|
-
mime_type = `file -
|
33
|
+
mime_type = `file -b --mime #{file}`.gsub(/\n/,"").split(';')[0]
|
34
34
|
file_size = file.nil? ? 0 : File.size(file)
|
35
35
|
sign = Digest::MD5.hexdigest("PUT&#{uri}&#{date}&#{file_size}&#{@signed_password}")
|
36
36
|
|
data/lib/upyun-rb/version.rb
CHANGED