Skip to content

Commit cd62d71

Browse files
committed
Merge pull request #75 from SunLn/fix_single_bug
revert some update
2 parents bd321da + e343fc9 commit cd62d71

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ qiniu-js-sdk
5555
* 初始化上传
5656
5757
```javascript
58-
var Qiniu = new QiniuJsSDK();
5958
var uploader = Qiniu.uploader({
6059
runtimes: 'html5,flash,html4', //上传模式,依次退化
6160
browse_button: 'pickfiles', //上传选择的点选按钮,**必需**
@@ -137,19 +136,18 @@ qiniu-js-sdk
137136
138137
如果一个页面中有多个上传实例,可以如下操作
139138
```javascript
140-
var Qiniu = new QiniuJsSDK();
141-
var op1 = {
139+
var option1 = {
142140
key : val ,
143141
……
144142
};
145-
var uploader = Qiniu.uploader(op1);
143+
var uploader = Qiniu.uploader(option1);
146144
147145
var Qiniu2 = new QiniuJsSDK();
148-
var op2 = {
146+
var option2 = {
149147
key : val ,
150148
……
151149
};
152-
var uploader2 = Qiniu2.uploader(op2);
150+
var uploader2 = Qiniu2.uploader(option2);
153151
154152
```
155153

demo/js/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
$(function() {
8-
var Qiniu = new QiniuJsSDK();
98
var uploader = Qiniu.uploader({
109
runtimes: 'html5,flash,html4',
1110
browse_button: 'pickfiles',

demo/js/multiple.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
$(function() {
8-
var Qiniu = new QiniuJsSDK();
98
var uploader = Qiniu.uploader({
109
runtimes: 'html5,flash,html4',
1110
browse_button: 'pickfiles',
@@ -60,8 +59,8 @@ $(function() {
6059
console.log('hello man,a file is uploaded');
6160
});
6261

63-
var Qiniu2 = new QiniuJsSDK();
64-
var uploader2 = Qiniu2.uploader({
62+
var Q2 = new QiniuJsSDK();
63+
var uploader2 = Q2.uploader({
6564
runtimes: 'html5,flash,html4',
6665
browse_button: 'pickfiles2',
6766
container: 'container2',

demo/js/qiniu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*global plupload ,mOxie*/
22
/*global ActiveXObject */
3+
/*exported Qiniu */
34
/*exported QiniuJsSDK */
45

56
function QiniuJsSDK() {
@@ -855,3 +856,5 @@ function QiniuJsSDK() {
855856
};
856857

857858
}
859+
860+
var Qiniu = new QiniuJsSDK();

demo/views/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ <h4 class="modal-title" id="myModalLabel">查看初始化代码</h4>
8686
<div class="modal-body">
8787
<pre><code>
8888
//引入Plupload 、qiniu.js后
89-
var Qiniu = new QiniuJsSDK();
9089
var uploader = Qiniu.uploader({
9190
runtimes: 'html5,flash,html4', //上传模式,依次退化
9291
browse_button: 'pickfiles', //上传选择的点选按钮,**必需**

demo/views/multiple.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ <h4 class="modal-title" id="myModalLabel">查看初始化代码</h4>
9292
<div class="modal-body">
9393
<pre><code>
9494
//引入Plupload 、qiniu.js后
95-
var Qiniu = new QiniuJsSDK();
9695
var uploader = Qiniu.uploader({
9796
runtimes: 'html5,flash,html4', //上传模式,依次退化
9897
browse_button: 'pickfiles', //上传选择的点选按钮,**必需**
@@ -154,6 +153,14 @@ <h4 class="modal-title" id="myModalLabel">查看初始化代码</h4>
154153
// domain 为七牛空间(bucket)对应的域名,选择某个空间后,可通过"空间设置->基本设置->域名设置"查看获取
155154

156155
// uploader 为一个plupload对象,继承了所有plupload的方法,参考http://plupload.com/docs
156+
157+
// 第二个上传实例
158+
var option2 = {
159+
key : val,
160+
……
161+
}
162+
var Q2 = new QiniuJsSDK();
163+
var uploader2 = Q2.uploader(option2);
157164
</code></pre>
158165
</div>
159166
<div class="modal-footer">

src/qiniu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*global plupload ,mOxie*/
22
/*global ActiveXObject */
3+
/*exported Qiniu */
34
/*exported QiniuJsSDK */
45

56
function QiniuJsSDK() {
@@ -855,3 +856,5 @@ function QiniuJsSDK() {
855856
};
856857

857858
}
859+
860+
var Qiniu = new QiniuJsSDK();

src/qiniu.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)