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
Add File remove listener, or something similiar #1342
Comments
a remove file listener is CRITICAL...I d nto think it is an enhancement. |
lolytxd.....btw where do you see the .addPropertyChangeListener("files",... ???.... well...if you mean the workaround that requires you to extend upload to get at it at the dom... this is really a tough workaround. if i have to extend every component to use it starting from LABELs and up to UPLOADs... it will be kind of messy code |
Here is what I did to detect user clicks on abort icon;
|
see this thread as well for our workaround |
why there is a clear button that doesn't work ? |
Are there any updates? For me, this is a really obvious and serious bug: I click to remove an upload, but the file is still in the upload's buffer on the server-side. A fix would be highly appreciated. |
It looks like there is not going to be a fix any time soon. I'm considering to hide the upload component as soon as the upload is complete and replace it with a regular list - and deal with the deletions there. It is still not a very good solution as my flow implies that users repeatedly add more files to the set and remove them looking for a right combination of data. This issue is not an enhancement, @caalador , this is a defect. |
Update: The |
Confirmed: the I am trying to solve the larger problem with a different approach and would appreciate feedback anyone might have. See description here. |
I'm using the file-remove event now. But I don't know how to see what got removed. Does anyone have an idea? My code:
|
@Braus You can configure the low level event listener to extract e.g.
|
Is there a plan to make the file remove event more seamless on Java? Similar to how the addSucceededListener works? Also, is there a way to get which file in the list is being deleted, rather than just the filename? When there are multiple files with the same name there's no way of knowing which one was deleted. |
See also: #2965 There is a complete workaround example here: https://gist.github.com/TatuLund/986114a82078e7228b1c37ba4b07f94d |
So suggested API to be created on
|
Vaadin version: 10.0.0
Description
When I add Upload component with uploaded file preview component, like in section
Filtered multi file upload for images
in https://vaadin.com/components/vaadin-upload/java-examples, how can I find out, which file was removed, so I can remove file preview?I see that there is
.addPropertyChangeListener("files",...
but I think it doesn't work. It fires only at start and then nothing.The text was updated successfully, but these errors were encountered: