Browse Source

feat(upload): support Error obj (message) (#28716)

pull/28884/head
Dave 4 years ago
committed by GitHub
parent
commit
97796a45b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/upload/UploadList/ListItem.tsx

2
components/upload/UploadList/ListItem.tsx

@ -220,7 +220,7 @@ const ListItem = React.forwardRef(
if (file.response && typeof file.response === 'string') {
message = file.response;
} else {
message = (file.error && file.error.statusText) || locale.uploadError;
message = file.error?.statusText || file.error?.message || locale.uploadError;
}
const iconAndPreview = (
<span className={spanClassName}>

Loading…
Cancel
Save