diff --git a/src/qiniu.js b/src/qiniu.js index 1dfef46b..2caef56e 100644 --- a/src/qiniu.js +++ b/src/qiniu.js @@ -305,7 +305,7 @@ function QiniuJsSDK() { }; plupload.extend(option, op, { - url: 'http://up.qiniu.com', + url: 'http://upload.qiniu.com', chunk_size: 0, multipart_params: { token: '' @@ -363,7 +363,7 @@ function QiniuJsSDK() { up.setOption({ - 'url': 'http://up.qiniu.com/', + 'url': 'http://upload.qiniu.com/', 'multipart': true, 'chunk_size': undefined, 'multipart_params': multipart_params_obj @@ -381,7 +381,7 @@ function QiniuJsSDK() { var blockSize = chunk_size; ctx = ''; up.setOption({ - 'url': 'http://up.qiniu.com/mkblk/' + blockSize, + 'url': 'http://upload.qiniu.com/mkblk/' + blockSize, 'multipart': false, 'chunk_size': chunk_size, 'headers': { @@ -404,7 +404,7 @@ function QiniuJsSDK() { chunk_size = chunk_size || (up.settings && up.settings.chunk_size); if (leftSize < chunk_size) { up.setOption({ - 'url': 'http://up.qiniu.com/mkblk/' + leftSize + 'url': 'http://upload.qiniu.com/mkblk/' + leftSize }); } @@ -555,7 +555,7 @@ function QiniuJsSDK() { } } - var url = 'http://up.qiniu.com/mkfile/' + file.size + key + x_vars_url; + var url = 'http://upload.qiniu.com/mkfile/' + file.size + key + x_vars_url; var ajax = that.createAjax(); ajax.open('POST', url, true); ajax.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8'); diff --git a/src/qiniu.min.js b/src/qiniu.min.js index 3b308207..326fd6ac 100644 --- a/src/qiniu.min.js +++ b/src/qiniu.min.js @@ -1 +1 @@ -function QiniuJsSDK(){this.detectIEVersion=function(){for(var a=4,b=document.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="",c[0];)a++;return a>4?a:!1},this.isImage=function(a){var b,c="",d=["png","jpg","jpeg","gif","bmp"],e=/\.([a-zA-Z0-9]+)(\?|\@|$)/;if(!a||!e.test(a))return!1;b=e.exec(a),c=b[1].toLowerCase();for(var f=0,g=d.length;g>f;f++)if(c===d[f])return!0;return!1},this.getFileExtension=function(a){var b,c=a.split(".");return b=1===c.length||""===c[0]&&2===c.length?"":c.pop().toLowerCase()},this.utf8_encode=function(a){if(null===a||"undefined"==typeof a)return"";var b,c,d=a+"",e="",f=0;b=c=0,f=d.length;for(var g=0;f>g;g++){var h=d.charCodeAt(g),i=null;if(128>h)c++;else if(h>127&&2048>h)i=String.fromCharCode(h>>6|192,63&h|128);else if(63488&h^!0)i=String.fromCharCode(h>>12|224,h>>6&63|128,63&h|128);else{if(64512&h^!0)throw new RangeError("Unmatched trail surrogate at "+g);var j=d.charCodeAt(++g);if(64512&j^!0)throw new RangeError("Unmatched lead surrogate at "+(g-1));h=((1023&h)<<10)+(1023&j)+65536,i=String.fromCharCode(h>>18|240,h>>12&63|128,h>>6&63|128,63&h|128)}null!==i&&(c>b&&(e+=d.slice(b,c)),e+=i,b=c=g+1)}return c>b&&(e+=d.slice(b,f)),e},this.base64_encode=function(a){var b,c,d,e,f,g,h,i,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",k=0,l=0,m="",n=[];if(!a)return a;a=this.utf8_encode(a+"");do b=a.charCodeAt(k++),c=a.charCodeAt(k++),d=a.charCodeAt(k++),i=b<<16|c<<8|d,e=i>>18&63,f=i>>12&63,g=i>>6&63,h=63&i,n[l++]=j.charAt(e)+j.charAt(f)+j.charAt(g)+j.charAt(h);while(k=f&&b.chunk_size&&b.runtimes.indexOf("flash")>=0?b.chunk_size=0:(c=20,d=4<d&&(b.chunk_size=d))};g();var h=function(){if(b.uptoken)a.token=b.uptoken;else{var c=a.createAjax();c.open("GET",a.uptoken_url,!0),c.setRequestHeader("If-Modified-Since","0"),c.onreadystatechange=function(){if(4===c.readyState&&200===c.status){var b=a.parseJSON(c.responseText);a.token=b.uptoken}},c.send()}},i=function(c,d,e){var f="",g=!1;if(!b.save_key)if(g=c.getOption&&c.getOption("unique_names"),g=g||c.settings&&c.settings.unique_names){var h=a.getFileExtension(d.name);f=h?d.id+"."+h:d.id}else f="function"==typeof e?e(c,d):d.name;return f};plupload.extend(c,b,{url:"http://up.qiniu.com",chunk_size:0,multipart_params:{token:""}});var j=new plupload.Uploader(c);return j.bind("Init",function(){h()}),j.init(),j.bind("FilesAdded",function(a,b){var c=a.getOption&&a.getOption("auto_start");c=c||a.settings&&a.settings.auto_start,c&&$.each(b,function(){a.start()}),a.refresh()}),j.bind("BeforeUpload",function(c,d){f="";var e=function(c,d,e){var f;f=b.save_key?{token:a.token}:{key:i(c,d,e),token:a.token};var g=b.x_vars;if(void 0!==g&&"object"==typeof g)for(var h in g)g.hasOwnProperty(h)&&("function"==typeof g[h]?f["x:"+h]=g[h](c,d):"object"!=typeof g[h]&&(f["x:"+h]=g[h]));c.setOption({url:"http://up.qiniu.com/",multipart:!0,chunk_size:void 0,multipart_params:f})},g=c.getOption&&c.getOption("chunk_size");if(g=g||c.settings&&c.settings.chunk_size,"html5"===j.runtime&&g)if(d.sizeg&&b.setOption({url:"http://up.qiniu.com/mkblk/"+g})}),j.bind("Error",function(b){return function(c,d){var e="",f=d.file;if(f){switch(d.code){case plupload.FAILED:e="上传失败。请稍后再试。";break;case plupload.FILE_SIZE_ERROR:var g=c.getOption&&c.getOption("max_file_size");g=g||c.settings&&c.settings.max_file_size,e="浏览器最大可上传"+g+"。更大文件请使用命令行工具。";break;case plupload.FILE_EXTENSION_ERROR:e="文件验证失败。请稍后重试。";break;case plupload.HTTP_ERROR:var h=a.parseJSON(d.response),i=h.error;switch(d.status){case 400:e="请求报文格式错误。";break;case 401:e="客户端认证授权失败。请重试或提交反馈。";break;case 405:e="客户端请求错误。请重试或提交反馈。";break;case 579:e="资源上传成功,但回调失败。";break;case 599:e="网络连接异常。请重试或提交反馈。";break;case 614:e="文件已存在。";try{h=a.parseJSON(h.error),i=h.error||"file exists"}catch(k){throw"invalid json format"}break;case 631:e="指定空间不存在。";break;case 701:e="上传数据块校验出错。请重试或提交反馈。";break;default:e="未知错误。"}e=e+"("+d.status+":"+i+")";break;case plupload.SECURITY_ERROR:e="安全配置错误。请联系网站管理员。";break;case plupload.GENERIC_ERROR:e="上传失败。请稍后再试。";break;case plupload.IO_ERROR:e="上传失败。请稍后再试。";break;case plupload.INIT_ERROR:e="网站配置错误。请联系网站管理员。",j.destroy();break;default:e=d.message+d.details}b&&b(c,d,e)}c.refresh()}}(d)),j.bind("FileUploaded",function(c){return function(d,e,g){var h=function(d,e,f){if(b.downtoken_url){var g=a.createAjax();g.open("POST",b.downtoken_url,!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.onreadystatechange=function(){if(4===g.readyState)if(200===g.status){var b;try{b=a.parseJSON(g.responseText)}catch(h){throw"invalid json format"}var i={};plupload.extend(i,a.parseJSON(f),b),c&&c(d,e,JSON.stringify(i))}else j.trigger("Error",{status:g.status,response:g.responseText,file:e,code:plupload.HTTP_ERROR})},g.send("key="+a.parseJSON(f).key+"&domain="+b.domain)}else c&&c(d,e,f)},k=a.parseJSON(g.response);if(f=f?f:k.ctx){var l="";b.save_key||(l=i(d,e,a.key_handler),l=l?"/key/"+a.URLSafeBase64Encode(l):"");var m=b.x_vars,n="",o="";if(void 0!==m&&"object"==typeof m)for(var p in m)m.hasOwnProperty(p)&&("function"==typeof m[p]?n=a.URLSafeBase64Encode(m[p](d,e)):"object"!=typeof m[p]&&(n=a.URLSafeBase64Encode(m[p])),o+="/x:"+p+"/"+n);var q="http://up.qiniu.com/mkfile/"+e.size+l+o,r=a.createAjax();r.open("POST",q,!0),r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),r.setRequestHeader("Authorization","UpToken "+a.token),r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var a=r.responseText;h(d,e,a)}else j.trigger("Error",{status:r.status,response:r.responseText,file:e,code:-200})},r.send(f)}else h(d,e,g.response)}}(e)),j},this.getUrl=function(a){if(!a)return!1;a=encodeURI(a);var b=this.domain;return"/"!==b.slice(b.length-1)&&(b+="/"),b+a},this.imageView2=function(a,b){var c=a.mode||"",d=a.w||"",e=a.h||"",f=a.quality||"",g=a.format||"";if(!c)return!1;if(!d&&!e)return!1;var h="imageView2/"+c;return h+=d?"/w/"+d:"",h+=e?"/h/"+e:"",h+=f?"/q/"+f:"",h+=g?"/format/"+g:"",b&&(h=this.getUrl(b)+"?"+h),h},this.imageMogr2=function(a,b){var c=a["auto-orient"]||"",d=a.thumbnail||"",e=a.strip||"",f=a.gravity||"",g=a.crop||"",h=a.quality||"",i=a.rotate||"",j=a.format||"",k=a.blur||"",l="imageMogr2";return l+=c?"/auto-orient":"",l+=d?"/thumbnail/"+d:"",l+=e?"/strip":"",l+=f?"/gravity/"+f:"",l+=h?"/quality/"+h:"",l+=g?"/crop/"+g:"",l+=i?"/rotate/"+i:"",l+=j?"/format/"+j:"",l+=k?"/blur/"+k:"",b&&(l=this.getUrl(b)+"?"+l),l},this.watermark=function(a,b){var c=a.mode;if(!c)return!1;var d="watermark/"+c;if(1===c){var e=a.image||"";if(!e)return!1;d+=e?"/image/"+this.URLSafeBase64Encode(e):""}else{if(2!==c)return!1;var f=a.text?a.text:"",g=a.font?a.font:"",h=a.fontsize?a.fontsize:"",i=a.fill?a.fill:"";if(!f)return!1;d+=f?"/text/"+this.URLSafeBase64Encode(f):"",d+=g?"/font/"+this.URLSafeBase64Encode(g):"",d+=h?"/fontsize/"+h:"",d+=i?"/fill/"+this.URLSafeBase64Encode(i):""}var j=a.dissolve||"",k=a.gravity||"",l=a.dx||"",m=a.dy||"";return d+=j?"/dissolve/"+j:"",d+=k?"/gravity/"+k:"",d+=l?"/dx/"+l:"",d+=m?"/dy/"+m:"",b&&(d=this.getUrl(b)+"?"+d),d},this.imageInfo=function(a){if(!a)return!1;var b,c=this.getUrl(a)+"?imageInfo",d=this.createAjax(),e=this;return d.open("GET",c,!1),d.onreadystatechange=function(){4===d.readyState&&200===d.status&&(b=e.parseJSON(d.responseText))},d.send(),b},this.exif=function(a){if(!a)return!1;var b,c=this.getUrl(a)+"?exif",d=this.createAjax(),e=this;return d.open("GET",c,!1),d.onreadystatechange=function(){4===d.readyState&&200===d.status&&(b=e.parseJSON(d.responseText))},d.send(),b},this.get=function(a,b){return b&&a?"exif"===a?this.exif(b):"imageInfo"===a?this.imageInfo(b):!1:!1},this.pipeline=function(a,b){var c,d,e="[object Array]"===Object.prototype.toString.call(a),f="";if(e){for(var g=0,h=a.length;h>g;g++){if(c=a[g],!c.fop)return!1;switch(c.fop){case"watermark":f+=this.watermark(c)+"|";break;case"imageView2":f+=this.imageView2(c)+"|";break;case"imageMogr2":f+=this.imageMogr2(c)+"|";break;default:d=!0}if(d)return!1}if(b){f=this.getUrl(b)+"?"+f;var i=f.length;"|"===f.slice(i-1)&&(f=f.slice(0,i-1))}return f}return!1}}var Qiniu=new QiniuJsSDK; \ No newline at end of file +function QiniuJsSDK(){this.detectIEVersion=function(){for(var a=4,b=document.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="",c[0];)a++;return a>4?a:!1},this.isImage=function(a){var b,c="",d=["png","jpg","jpeg","gif","bmp"],e=/\.([a-zA-Z0-9]+)(\?|\@|$)/;if(!a||!e.test(a))return!1;b=e.exec(a),c=b[1].toLowerCase();for(var f=0,g=d.length;g>f;f++)if(c===d[f])return!0;return!1},this.getFileExtension=function(a){var b,c=a.split(".");return b=1===c.length||""===c[0]&&2===c.length?"":c.pop().toLowerCase()},this.utf8_encode=function(a){if(null===a||"undefined"==typeof a)return"";var b,c,d=a+"",e="",f=0;b=c=0,f=d.length;for(var g=0;f>g;g++){var h=d.charCodeAt(g),i=null;if(128>h)c++;else if(h>127&&2048>h)i=String.fromCharCode(h>>6|192,63&h|128);else if(63488&h^!0)i=String.fromCharCode(h>>12|224,h>>6&63|128,63&h|128);else{if(64512&h^!0)throw new RangeError("Unmatched trail surrogate at "+g);var j=d.charCodeAt(++g);if(64512&j^!0)throw new RangeError("Unmatched lead surrogate at "+(g-1));h=((1023&h)<<10)+(1023&j)+65536,i=String.fromCharCode(h>>18|240,h>>12&63|128,h>>6&63|128,63&h|128)}null!==i&&(c>b&&(e+=d.slice(b,c)),e+=i,b=c=g+1)}return c>b&&(e+=d.slice(b,f)),e},this.base64_encode=function(a){var b,c,d,e,f,g,h,i,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",k=0,l=0,m="",n=[];if(!a)return a;a=this.utf8_encode(a+"");do b=a.charCodeAt(k++),c=a.charCodeAt(k++),d=a.charCodeAt(k++),i=b<<16|c<<8|d,e=i>>18&63,f=i>>12&63,g=i>>6&63,h=63&i,n[l++]=j.charAt(e)+j.charAt(f)+j.charAt(g)+j.charAt(h);while(k=f&&b.chunk_size&&b.runtimes.indexOf("flash")>=0?b.chunk_size=0:(c=20,d=4<d&&(b.chunk_size=d))};g();var h=function(){if(b.uptoken)a.token=b.uptoken;else{var c=a.createAjax();c.open("GET",a.uptoken_url,!0),c.setRequestHeader("If-Modified-Since","0"),c.onreadystatechange=function(){if(4===c.readyState&&200===c.status){var b=a.parseJSON(c.responseText);a.token=b.uptoken}},c.send()}},i=function(c,d,e){var f="",g=!1;if(!b.save_key)if(g=c.getOption&&c.getOption("unique_names"),g=g||c.settings&&c.settings.unique_names){var h=a.getFileExtension(d.name);f=h?d.id+"."+h:d.id}else f="function"==typeof e?e(c,d):d.name;return f};plupload.extend(c,b,{url:"http://upload.qiniu.com",chunk_size:0,multipart_params:{token:""}});var j=new plupload.Uploader(c);return j.bind("Init",function(){h()}),j.init(),j.bind("FilesAdded",function(a,b){var c=a.getOption&&a.getOption("auto_start");c=c||a.settings&&a.settings.auto_start,c&&$.each(b,function(){a.start()}),a.refresh()}),j.bind("BeforeUpload",function(c,d){f="";var e=function(c,d,e){var f;f=b.save_key?{token:a.token}:{key:i(c,d,e),token:a.token};var g=b.x_vars;if(void 0!==g&&"object"==typeof g)for(var h in g)g.hasOwnProperty(h)&&("function"==typeof g[h]?f["x:"+h]=g[h](c,d):"object"!=typeof g[h]&&(f["x:"+h]=g[h]));c.setOption({url:"http://upload.qiniu.com/",multipart:!0,chunk_size:void 0,multipart_params:f})},g=c.getOption&&c.getOption("chunk_size");if(g=g||c.settings&&c.settings.chunk_size,"html5"===j.runtime&&g)if(d.sizeg&&b.setOption({url:"http://upload.qiniu.com/mkblk/"+g})}),j.bind("Error",function(b){return function(c,d){var e="",f=d.file;if(f){switch(d.code){case plupload.FAILED:e="上传失败。请稍后再试。";break;case plupload.FILE_SIZE_ERROR:var g=c.getOption&&c.getOption("max_file_size");g=g||c.settings&&c.settings.max_file_size,e="浏览器最大可上传"+g+"。更大文件请使用命令行工具。";break;case plupload.FILE_EXTENSION_ERROR:e="文件验证失败。请稍后重试。";break;case plupload.HTTP_ERROR:var h=a.parseJSON(d.response),i=h.error;switch(d.status){case 400:e="请求报文格式错误。";break;case 401:e="客户端认证授权失败。请重试或提交反馈。";break;case 405:e="客户端请求错误。请重试或提交反馈。";break;case 579:e="资源上传成功,但回调失败。";break;case 599:e="网络连接异常。请重试或提交反馈。";break;case 614:e="文件已存在。";try{h=a.parseJSON(h.error),i=h.error||"file exists"}catch(k){throw"invalid json format"}break;case 631:e="指定空间不存在。";break;case 701:e="上传数据块校验出错。请重试或提交反馈。";break;default:e="未知错误。"}e=e+"("+d.status+":"+i+")";break;case plupload.SECURITY_ERROR:e="安全配置错误。请联系网站管理员。";break;case plupload.GENERIC_ERROR:e="上传失败。请稍后再试。";break;case plupload.IO_ERROR:e="上传失败。请稍后再试。";break;case plupload.INIT_ERROR:e="网站配置错误。请联系网站管理员。",j.destroy();break;default:e=d.message+d.details}b&&b(c,d,e)}c.refresh()}}(d)),j.bind("FileUploaded",function(c){return function(d,e,g){var h=function(d,e,f){if(b.downtoken_url){var g=a.createAjax();g.open("POST",b.downtoken_url,!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.onreadystatechange=function(){if(4===g.readyState)if(200===g.status){var b;try{b=a.parseJSON(g.responseText)}catch(h){throw"invalid json format"}var i={};plupload.extend(i,a.parseJSON(f),b),c&&c(d,e,JSON.stringify(i))}else j.trigger("Error",{status:g.status,response:g.responseText,file:e,code:plupload.HTTP_ERROR})},g.send("key="+a.parseJSON(f).key+"&domain="+b.domain)}else c&&c(d,e,f)},k=a.parseJSON(g.response);if(f=f?f:k.ctx){var l="";b.save_key||(l=i(d,e,a.key_handler),l=l?"/key/"+a.URLSafeBase64Encode(l):"");var m=b.x_vars,n="",o="";if(void 0!==m&&"object"==typeof m)for(var p in m)m.hasOwnProperty(p)&&("function"==typeof m[p]?n=a.URLSafeBase64Encode(m[p](d,e)):"object"!=typeof m[p]&&(n=a.URLSafeBase64Encode(m[p])),o+="/x:"+p+"/"+n);var q="http://upload.qiniu.com/mkfile/"+e.size+l+o,r=a.createAjax();r.open("POST",q,!0),r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),r.setRequestHeader("Authorization","UpToken "+a.token),r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var a=r.responseText;h(d,e,a)}else j.trigger("Error",{status:r.status,response:r.responseText,file:e,code:-200})},r.send(f)}else h(d,e,g.response)}}(e)),j},this.getUrl=function(a){if(!a)return!1;a=encodeURI(a);var b=this.domain;return"/"!==b.slice(b.length-1)&&(b+="/"),b+a},this.imageView2=function(a,b){var c=a.mode||"",d=a.w||"",e=a.h||"",f=a.quality||"",g=a.format||"";if(!c)return!1;if(!d&&!e)return!1;var h="imageView2/"+c;return h+=d?"/w/"+d:"",h+=e?"/h/"+e:"",h+=f?"/q/"+f:"",h+=g?"/format/"+g:"",b&&(h=this.getUrl(b)+"?"+h),h},this.imageMogr2=function(a,b){var c=a["auto-orient"]||"",d=a.thumbnail||"",e=a.strip||"",f=a.gravity||"",g=a.crop||"",h=a.quality||"",i=a.rotate||"",j=a.format||"",k=a.blur||"",l="imageMogr2";return l+=c?"/auto-orient":"",l+=d?"/thumbnail/"+d:"",l+=e?"/strip":"",l+=f?"/gravity/"+f:"",l+=h?"/quality/"+h:"",l+=g?"/crop/"+g:"",l+=i?"/rotate/"+i:"",l+=j?"/format/"+j:"",l+=k?"/blur/"+k:"",b&&(l=this.getUrl(b)+"?"+l),l},this.watermark=function(a,b){var c=a.mode;if(!c)return!1;var d="watermark/"+c;if(1===c){var e=a.image||"";if(!e)return!1;d+=e?"/image/"+this.URLSafeBase64Encode(e):""}else{if(2!==c)return!1;var f=a.text?a.text:"",g=a.font?a.font:"",h=a.fontsize?a.fontsize:"",i=a.fill?a.fill:"";if(!f)return!1;d+=f?"/text/"+this.URLSafeBase64Encode(f):"",d+=g?"/font/"+this.URLSafeBase64Encode(g):"",d+=h?"/fontsize/"+h:"",d+=i?"/fill/"+this.URLSafeBase64Encode(i):""}var j=a.dissolve||"",k=a.gravity||"",l=a.dx||"",m=a.dy||"";return d+=j?"/dissolve/"+j:"",d+=k?"/gravity/"+k:"",d+=l?"/dx/"+l:"",d+=m?"/dy/"+m:"",b&&(d=this.getUrl(b)+"?"+d),d},this.imageInfo=function(a){if(!a)return!1;var b,c=this.getUrl(a)+"?imageInfo",d=this.createAjax(),e=this;return d.open("GET",c,!1),d.onreadystatechange=function(){4===d.readyState&&200===d.status&&(b=e.parseJSON(d.responseText))},d.send(),b},this.exif=function(a){if(!a)return!1;var b,c=this.getUrl(a)+"?exif",d=this.createAjax(),e=this;return d.open("GET",c,!1),d.onreadystatechange=function(){4===d.readyState&&200===d.status&&(b=e.parseJSON(d.responseText))},d.send(),b},this.get=function(a,b){return b&&a?"exif"===a?this.exif(b):"imageInfo"===a?this.imageInfo(b):!1:!1},this.pipeline=function(a,b){var c,d,e="[object Array]"===Object.prototype.toString.call(a),f="";if(e){for(var g=0,h=a.length;h>g;g++){if(c=a[g],!c.fop)return!1;switch(c.fop){case"watermark":f+=this.watermark(c)+"|";break;case"imageView2":f+=this.imageView2(c)+"|";break;case"imageMogr2":f+=this.imageMogr2(c)+"|";break;default:d=!0}if(d)return!1}if(b){f=this.getUrl(b)+"?"+f;var i=f.length;"|"===f.slice(i-1)&&(f=f.slice(0,i-1))}return f}return!1}}var Qiniu=new QiniuJsSDK; \ No newline at end of file