|
@@ -1,5 +1,5 @@
|
1
|
|
-import Constants from './utils/contants'
|
2
|
|
-import generateMd5 from './utils/utils'
|
|
1
|
+import { Constants } from './utils/contants'
|
|
2
|
+import { getFilemd5sum } from './utils/utils'
|
3
|
3
|
|
4
|
4
|
function FileFactory(file) {
|
5
|
5
|
this.offset = 0; //用于断点续传,默认为 0
|
|
@@ -18,7 +18,7 @@ FileFactory.prototype.setOffset = function (offset) {
|
18
|
18
|
export default function UploadSdk(host, origin, token, file) {
|
19
|
19
|
|
20
|
20
|
this.handlers = [] //用于处理出触发事件
|
21
|
|
- this.host = host.indexOf('http:') > -1 ? 'http:'+ host
|
|
21
|
+ this.host = host.indexOf('http:') > -1 ? 'http:'+ host: host
|
22
|
22
|
this.origin = origin
|
23
|
23
|
this.token = token
|
24
|
24
|
this.file = file
|