Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

oj-file-picker , invalid FIle opens in browser tab

Abhijit-OracleOct 25 2022 — edited Oct 25 2022

Using oj-file-picker
<oj-file-picker selection-mode=“single”
on-oj-select=‘[[selectListener]]’
on-oj-invalid-select=‘[[invalidListener]]’
accept=‘[“image/*“]’ invalidListener : function(event) {
showErrorPopup(‘Please Select Valid image’);
}Issue : In invalidListener added method to launch popup with message.
If we drag and drop invalid file, popup launches which blocks drop event and selected file opens in browser.
Tried cancelling event by calling,
stopPropagation, preventDefault , stopImmediatePropagation
on event, event.detail.originalEvent, event.detail.originalEvent.nativeEventDidnt help. any alternative so that dragged file wont open in browser tab ?

This post has been answered by Abhijit-Oracle on Nov 4 2022
Jump to Answer

Comments

Processing

Post Details

Added on Oct 25 2022
2 comments
75 views