Skip to content

Commit

Permalink
Merge pull request #24 from ninja-at-work/master
Browse files Browse the repository at this point in the history
Fix aliyun OSS issues
  • Loading branch information
dengqinsi authored Mar 11, 2019
2 parents 60f9dd7 + 2d3c386 commit 919dd13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fog/aliyun/requests/storage/get_object_http_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_object_http_url_public(object, expires, options = {})
location = get_bucket_location(bucket)

if acl == 'private'
expires_time = (Time.now.to_i + expires).to_s
expires_time = (Time.now.to_i + (expires.nil? ? 0 : expires.to_i)).to_s
resource = bucket + '/' + object
signature = sign('GET', expires_time, nil, resource)
'http://' + bucket + '.' + location + '.aliyuncs.com/' + object +
Expand Down
2 changes: 1 addition & 1 deletion lib/fog/aliyun/requests/storage/get_object_https_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_object_https_url_public(object, expires, options = {})
location = get_bucket_location(bucket)

if acl == 'private'
expires_time = (Time.now.to_i + expires).to_s
expires_time = (Time.now.to_i + (expires.nil? ? 0 : expires.to_i)).to_s
resource = bucket + '/' + object
signature = sign('GET', expires_time, nil, resource)
'https://' + bucket + '.' + location + '.aliyuncs.com/' + object +
Expand Down

0 comments on commit 919dd13

Please sign in to comment.