mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-17 13:20:52 +08:00
fix(upload): doesn't allow 2xx status code except 200
This commit is contained in:
parent
a448a720d7
commit
8ceb19dd5a
@ -5,6 +5,7 @@
|
||||
### Fixes
|
||||
|
||||
- `n-upload` `on-finish` prop's `event` parameter type should be `ProgressEvent`.
|
||||
- `n-upload` doesn't allow 2xx status code except 200.
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
### Fixes
|
||||
|
||||
- `n-upload` `on-finish` 回调中 `event` 的类型应为 `ProgressEvent`
|
||||
- `n-upload` 不允许 200 之外的 2xx 响应状态码
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -69,7 +69,7 @@ function createXhrHandlers (
|
||||
doChange(fileAfterChange, e)
|
||||
}
|
||||
function handleXHRLoad (e: ProgressEvent<EventTarget>): void {
|
||||
if (XHR.status !== 200) {
|
||||
if (XHR.status < 200 || XHR.status >= 300) {
|
||||
handleXHRError(e)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user