docs: update sentence structure in the FAQ section (#33816)

This commit is contained in:
Eliot Sanford 2022-01-23 20:51:45 -06:00 committed by GitHub
parent e55a68670f
commit a65ba8aa8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ When uploading state change, it returns:
## FAQ
### How to implement upload server side?
### How do I implement upload server side?
- You can consult [jQuery-File-Upload](https://github.com/blueimp/jQuery-File-Upload/wiki#server-side) about how to implement server side upload interface.
- There is a mock example of [express](https://github.com/react-component/upload/blob/master/server.js) in rc-upload.
@ -107,10 +107,10 @@ Please set property `url` of each item in `fileList` to control content of link.
See <https://github.com/react-component/upload#customrequest>.
### Why `fileList` in control will not trigger `onChange` `status` update when file not in the list?
### Why will the `fileList` that's in control not trigger `onChange` `status` update when the file is not in the list?
`onChange` only trigger when file in the list, it will ignore left events when removed from the list. Please note that there exist bug which makes event still trigger even the file is not in the list before `4.13.0`.
`onChange` will only trigger when the file is in the list, it will ignore any events removed from the list. Please note that there does exist a bug which makes an event still trigger even when the file is not in the list before `4.13.0`.
### Why sometime `onChange` return File object and sometime return { originFileObj: File }?
### Why does `onChange` sometimes return File object and other times return { originFileObj: File }?
For compatible case, we return File object when `beforeUpload` return `false`. It will merge to `{ originFileObj: File }` in next major version. Current version is compatible to get origin file by `info.file.originFileObj`. You can change this before major release.