-
Notifications
You must be signed in to change notification settings - Fork 63
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
No file name attribute in ProgressUpdateEvent #1328
Comments
Any update on this? It's mandatory to track large uploads server-side. |
Please update this, we can't tracking progress if uploading multiple files in same time |
How this is getting totally ignored? Feedback would be greatly appreciated! |
Any updates on this? Looks like it's been requested for 4 years now. That's the exact reason I made the request. I'm trying to add an upload button on top of a table where the Upload component's status is not suitable and as a result there's no way to make a custom upload. |
I don't currently have a fix, but from what I can tell one of the issues with this upload component is that the events getting sent back to the server don't contain all the intended DOM event detail properties (including file name, among others). It appears that this is related to some of those properties being inherited. The "file" object that is attached to the vaadin-upload-file component inherits many core properties from the parent "File" type, and it's those inherited properties that are not being sent. Im not sure if ignoring inherited properties is by-design or not, but resolving that issue would allow us to use custom DOM event listeners as a work-around for this issue (and others related to the upload component). |
I just wanted to add a note here that it is possible to work around this bug by extending UploadElement on the client side, overriding _addfile, and manually firing your own CustomEvent using dispatchEvent. On the server side you can addEventListener() for your new event, but the secret sauce is using addEventData("event.detail") to express interest in the event data. The limitations with File fields like name getting dropped still apply, but you can just remap file.name to your own fileName field. |
Related very old PR: vaadin/vaadin-upload-flow#160 |
There is no file name attribute in ProgressUpdateEvent like for example in SucceededEvent or FinishedEvent. It would be necessary for customized progress indication (per file).
The text was updated successfully, but these errors were encountered: