fix: Message alerts for image upload using image upload button and url button #4665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
bug
What this PR does / why we need it:
This Pull request addresses the issue of issue #4494 where even if the image upload fails no message or alert was displayed.
This also covers the issue related to the URL. If URL of the image is provided, it didn't use to check if the URL is valid or not and consequently did not displayed any message. So through this PR request the following things are covered:
Before: No messages are displayed
After: Messages are displayed
Which issue(s) this PR fixes:
Fixes #4494
Testing
Since this was changes in UI, I tested with different URLs , valid and invalid to verify if the message is displayed.
I tested with different file extension to make see if there is invalid file extension the message is displayed.
Note:
Please ignore the WakelockSwitch.vue