Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The argument file.status of Upload onRemove is always 'removed' #15192

Closed
1 task
vipcxj opened this issue Mar 5, 2019 · 2 comments
Closed
1 task

The argument file.status of Upload onRemove is always 'removed' #15192

vipcxj opened this issue Mar 5, 2019 · 2 comments
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive

Comments

@vipcxj
Copy link

vipcxj commented Mar 5, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

click the upload button, select a file, click ok, wait upload complete then delete the file and see the output of the console.

What is expected?

error

What is actually happening?

removed

Environment Info
antd 3.13.6
React 16.8.3
System all
Browser all

Usually we clear the resource in the onRemove callback. for example request the server to delete the uploaded file (Which may be not exist because of upload error). So if file.status shows the last status, it will help us to decide what should do in the onRemove callback. On the other hand, only when onRemove return true, the status should become 'removed'.

@afc163 afc163 added 🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. labels Mar 5, 2019
lihz6 added a commit to lihz6/ant-design that referenced this issue Mar 5, 2019
@lihz6 lihz6 mentioned this issue May 24, 2019
13 tasks
@afc163
Copy link
Member

afc163 commented Sep 23, 2019

Fixed in #18937

@afc163 afc163 closed this as completed Sep 23, 2019
@dazjean
Copy link

dazjean commented Nov 14, 2019

Well, I just used the delete state in onremove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants