Steps to Reproduce
1.
<menuitem upload="true" label="Upload" onUpload='alert(event.media)'/>
2. click the menuitem
3. upload a file
Current Result
an error: Cannot access field: media, on object: [Event onUpload <Menuitem yW8Qa>]
Expected Result
no error. show the uploaded file name
Debug Information
- it passes an Event instead of an UploadEvent which breaks our own spec
- 8.5.2 works correctly and passes an UploadEvent for onUpload
Workaround
create the Upload event manually
<menuitem label="upload" upload="true" onUpload="Clients.log(UploadEvent.getLatestUploadEvent(event.getName(), event.getTarget()).media.name)"/>
- relates to
-
ZK-3277 Implement a Fileupload (using modern APIs)
- Closed