Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/qiniu/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def initialize(bucket,
:detect_mime => "detectMime" ,
:mime_limit => "mimeLimit" ,
:uphosts => "uphosts" ,
:global => "global"
:global => "global" ,
:delete_after_days => "deleteAfterDays"
} # PARAMS

public
Expand Down
4 changes: 3 additions & 1 deletion lib/qiniu/tokens/upload_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class UploadToken < AccessToken

include Utils

attr_accessor :scope, :expires_in, :callback_url, :callback_body, :callback_body_type, :customer, :escape, :async_options, :return_body, :return_url
attr_accessor :scope, :expires_in, :callback_url, :callback_body, :callback_body_type, :customer, :escape, :async_options, :return_body, :return_url, :delete_after_days

def initialize(opts = {})
@scope = opts[:scope]
Expand All @@ -26,6 +26,7 @@ def initialize(opts = {})
@persistent_pipeline = opts[:persistent_pipeline]
@return_body = opts[:return_body]
@return_url = opts[:return_url]
@delete_after_days = opts[:delete_after_days]
end

def generate_signature
Expand All @@ -41,6 +42,7 @@ def generate_signature
params[:persistentOps] = @persistent_ops if !@persistent_ops.nil? && !@persistent_ops.empty?
params[:persistentNotifyUrl] = @persistent_notify_url if !@persistent_notify_url.nil? && !@persistent_notify_url.empty?
params[:persistentPipeline] = @persistent_pipeline if !@persistent_pipeline.nil? && !@persistent_pipeline.empty?
params[:deleteAfterDays] = @delete_after_days if !@delete_after_days.nil? && !@delete_after_days.empty?

Utils.urlsafe_base64_encode(params.to_json)
end
Expand Down