rc-upload
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import React, { Component } from 'react'; | ||
@@ -18,3 +17,3 @@ import { UploadProps, RcFile } from './interface'; | ||
uploadFiles: (files: FileList) => void; | ||
upload(file: RcFile, fileList: Array<RcFile>): NodeJS.Timeout; | ||
upload(file: RcFile, fileList: Array<RcFile>): void; | ||
post(file: RcFile): void; | ||
@@ -21,0 +20,0 @@ reset(): void; |
@@ -135,5 +135,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
// always async in case use react state to keep fileList | ||
return setTimeout(function () { | ||
return _this2.post(file); | ||
}, 0); | ||
Promise.resolve().then(function () { | ||
_this2.post(file); | ||
}); | ||
return; | ||
} | ||
@@ -148,6 +149,8 @@ | ||
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') { | ||
return _this2.post(processedFile); | ||
_this2.post(processedFile); | ||
return; | ||
} | ||
return _this2.post(file); | ||
_this2.post(file); | ||
}).catch(function (e) { | ||
@@ -158,8 +161,6 @@ // eslint-disable-next-line no-console | ||
} else if (before !== false) { | ||
setTimeout(function () { | ||
return _this2.post(file); | ||
}, 0); | ||
Promise.resolve().then(function () { | ||
_this2.post(file); | ||
}); | ||
} | ||
return undefined; | ||
} | ||
@@ -166,0 +167,0 @@ }, { |
# History | ||
---- | ||
### 3.3.0 | ||
`2020-08-31` | ||
- chore: use father. [#268](https://github.com/react-component/upload/pull/268) | ||
### 3.2.0 | ||
@@ -5,0 +11,0 @@ |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import React, { Component } from 'react'; | ||
@@ -18,3 +17,3 @@ import { UploadProps, RcFile } from './interface'; | ||
uploadFiles: (files: FileList) => void; | ||
upload(file: RcFile, fileList: Array<RcFile>): NodeJS.Timeout; | ||
upload(file: RcFile, fileList: Array<RcFile>): void; | ||
post(file: RcFile): void; | ||
@@ -21,0 +20,0 @@ reset(): void; |
@@ -157,5 +157,6 @@ "use strict"; | ||
// always async in case use react state to keep fileList | ||
return setTimeout(function () { | ||
return _this2.post(file); | ||
}, 0); | ||
Promise.resolve().then(function () { | ||
_this2.post(file); | ||
}); | ||
return; | ||
} | ||
@@ -170,6 +171,8 @@ | ||
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') { | ||
return _this2.post(processedFile); | ||
_this2.post(processedFile); | ||
return; | ||
} | ||
return _this2.post(file); | ||
_this2.post(file); | ||
}).catch(function (e) { | ||
@@ -180,8 +183,6 @@ // eslint-disable-next-line no-console | ||
} else if (before !== false) { | ||
setTimeout(function () { | ||
return _this2.post(file); | ||
}, 0); | ||
Promise.resolve().then(function () { | ||
_this2.post(file); | ||
}); | ||
} | ||
return undefined; | ||
} | ||
@@ -188,0 +189,0 @@ }, { |
{ | ||
"name": "rc-upload", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "upload ui component for react", | ||
@@ -60,3 +60,3 @@ "keywords": [ | ||
"sinon": "^9.0.2", | ||
"typescript": "^3.7.2", | ||
"typescript": "^4.0.2", | ||
"vinyl-fs": "^3.0.3" | ||
@@ -63,0 +63,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55392