Closed TomiZet closed 6 years ago
File objects aren't serializable by default: http://jsbin.com/nuwivexeto/edit?html,js,console,output
I'm not sure which BE you're using and how your FE communicating with the BE, but maybe this workaround will work for your case: https://stackoverflow.com/a/29281243/1331425
Thanks for the reply! By BE I mean vaadin-flow server part of this UI component.. so the problem is not in the component itself, but in the event listeners, which are I guess registered by vaadin-client js library, correct? When debugging this problem I ended up in the obfuscated js code in the VAADIN/static/client and there the file object was serialized and send to the BE. If so, then this issue might be closed and I need to address it for the client library - same would apply also for issue #270.
Alright, I'll close this issue and #270 for now. Feel free to add comments in future on both issues so we can reopen them and fix issues if there are some.
Events 'upload-success', 'upload-error' and 'upload-abort' handled by vaadin-upload component are serialized and send to the back-end (BE). But the event.detail.file does not contain name property. Thus the BE has no information about which file upload was aborted. For more details see also vaadin/components gitter, message from 07th June 2018, Question#1