-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixed: Re-clicking on Upload file button & cancelling it gives error (#85zrhfp4c) #143
Conversation
… this was due to when we re-click on upload button to upload a file and click on cancel to cancel it, current file gets removed thus gives error accessing file name(#85zrhfp4c)
} | ||
else { | ||
showToast(translate("Something went wrong. Please try again")); | ||
showToast(translate("No new file upload. Please try again")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works when trying to change the file first time, but if we repeat changing the file more than once, then it does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sir. As we open the file dialogue but do not upload a new file, the event.target.files[0]
is set as undefined. Now, opening the file dialogue for the second time and not uploading a new file, keeps the value for event.target.files[0]
set as undefined, thus, not abling the change
event to trigger and hence, not running the getFile
function. So, nothing happens.
After discussion, it is concluded that we'll not implement the functionality to show the toast even after not selecting the file for the first time. The toast will appear only for the first time. |
Related Issues
Closes #121
Short Description and Why It's Useful
Unwanted error is removed, also if we decide not to upload a file, current file says selected.
Screenshots of Visual Changes before/after (If There Are Any)
IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance