From e0c4a14e20418198953fbad0484b5e4212462dbc Mon Sep 17 00:00:00 2001 From: liupeng Date: Tue, 8 Jul 2014 17:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4generate=5Fupload=5Ftoken=20?= =?UTF-8?q?=E4=B8=AD=E6=97=A7=E7=9A=84async=5Foptions,=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20persistent=5Fops,=20persistent=5Fnotify=5Furl,=20pe?= =?UTF-8?q?rsistent=5Fpipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/qiniu/tokens/upload_token.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/qiniu/tokens/upload_token.rb b/lib/qiniu/tokens/upload_token.rb index c5202f8..1da848c 100755 --- a/lib/qiniu/tokens/upload_token.rb +++ b/lib/qiniu/tokens/upload_token.rb @@ -19,7 +19,9 @@ module Qiniu @callback_body_type = opts[:callback_body_type] @customer = opts[:customer] @escape = opts[:escape] - @async_options = opts[:async_options] + @persistent_ops = opts[:persistent_ops] + @persistent_notify_url = opts[:persistent_notify_url] + @persistent_pipeline = opts[:persistent_pipeline] @return_body = opts[:return_body] @return_url = opts[:return_url] end @@ -31,9 +33,13 @@ module Qiniu params[:callbackBodyType] = @callback_body_type if !@callback_body_type.nil? && !@callback_body_type.empty? params[:customer] = @customer if !@customer.nil? && !@customer.empty? 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? + + params[:persistent_ops] = @persistent_ops if !@persistent_ops.nil? && !@persistent_ops.empty? + params[:persistent_notify_url] = @persistent_notify_url if !@persistent_notify_url.nil? && !@persistent_notify_url.empty? + params[:persistent_pipeline] = @persistent_pipeline if !@persistent_pipeline.nil? && !@persistent_pipeline.empty? + Utils.urlsafe_base64_encode(params.to_json) end