diff --git a/Makefile b/Makefile index 25b41cc3..db49fb2b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all : install build demo +all : install build dev install : npm install diff --git a/README.md b/README.md index 4f1cc52f..7c610e64 100644 --- a/README.md +++ b/README.md @@ -469,6 +469,7 @@ Qiniu-JavaScript-SDK 的示例 Demo 中的服务器端部分是基于[ Node.js ``` 3. 进入项目根目录,执行 `make dev` 访问 `http://127.0.0.1:19110/` 或 `http://localhost:19110/` + ### 说明 1. JS-SDK 依赖 Plupload,初始化之前请引入 Plupload。 @@ -599,6 +600,7 @@ $('#stop_load').on('click', function(){ 推荐一个关于 [CORS](http://enable-cors.org/) 的网站 + ### 贡献代码 1. 登录 https://github.com @@ -613,7 +615,7 @@ $('#stop_load').on('click', function(){ 6. 然后到 github 网站的该 git 远程仓库的 new-feature 分支下发起 Pull Request - + ### 许可证 > Copyright (c) 2014 qiniu.com diff --git a/demo/scripts/main.js b/demo/scripts/main.js index 93616584..f6e2a5f9 100644 --- a/demo/scripts/main.js +++ b/demo/scripts/main.js @@ -14,7 +14,22 @@ $(function() { flash_swf_url: 'bower_components/plupload/js/Moxie.swf', dragdrop: true, chunk_size: '4mb', + multi_selection: !(mOxie.Env.OS.toLowerCase()==="ios"), uptoken_url: $('#uptoken_url').val(), + // uptoken_func: function(){ + // var ajax = new XMLHttpRequest(); + // ajax.open('GET', $('#uptoken_url').val(), false); + // ajax.setRequestHeader("If-Modified-Since", "0"); + // ajax.send(); + // if (ajax.status === 200) { + // var res = JSON.parse(ajax.responseText); + // console.log('custom uptoken_func:' + res.uptoken); + // return res.uptoken; + // } else { + // console.log('custom uptoken_func err'); + // return ''; + // } + // }, domain: $('#domain').val(), get_new_uptoken: false, // downtoken_url: '/downtoken', diff --git a/demo/views/index.html b/demo/views/index.html index bae053e2..769990d4 100644 --- a/demo/views/index.html +++ b/demo/views/index.html @@ -13,235 +13,357 @@ -
-
-

- 七牛云存储 - JavaScript SDK - - 查看初始化代码 - - - - View Source on Github - -

- - -