mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 12:56:21 +10:00
returnUrl
This commit is contained in:
@@ -10,7 +10,7 @@ module Qiniu
|
||||
|
||||
include Utils
|
||||
|
||||
attr_accessor :scope, :expires_in, :callback_url, :callback_body, :callback_body_type, :customer, :escape, :async_options, :return_body
|
||||
attr_accessor :scope, :expires_in, :callback_url, :callback_body, :callback_body_type, :customer, :escape, :async_options, :return_body, :return_url
|
||||
|
||||
def initialize(opts = {})
|
||||
@scope = opts[:scope]
|
||||
@@ -22,6 +22,7 @@ module Qiniu
|
||||
@escape = opts[:escape]
|
||||
@async_options = opts[:async_options]
|
||||
@return_body = opts[:return_body]
|
||||
@return_url = opts[:return_url]
|
||||
end
|
||||
|
||||
def generate_signature
|
||||
@@ -33,6 +34,7 @@ module Qiniu
|
||||
params[:escape] = 1 if @escape == 1 || @escape == true
|
||||
params[:asyncOps] = @async_options if !@async_options.nil? && !@async_options.empty?
|
||||
params[:returnBody] = @return_body if !@return_body.nil? && !@return_body.empty?
|
||||
params[:returnUrl] = @return_url if !@return_url.nil? && !@return_url.empty?
|
||||
Utils.urlsafe_base64_encode(params.to_json)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user