[GH-ISSUE #2294] [FR] Handle incorrect image url #956

Closed
opened 2026-03-23 20:43:35 +00:00 by mirror · 11 comments
Owner

Originally created by @annieappflowy on GitHub (Apr 19, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2294

Originally assigned to: @Xazin on GitHub.

Description

I should not be allowed to upload an image via an incorrect url
image

Impact

Users who insert images using URLs

Additional Context

No response

Originally created by @annieappflowy on GitHub (Apr 19, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2294 Originally assigned to: @Xazin on GitHub. ### Description I should not be allowed to upload an image via an incorrect url <img width="367" alt="image" src="https://user-images.githubusercontent.com/12026239/233061897-e878ff8f-3b93-422e-ac88-4a97b1737d65.png"> ### Impact Users who insert images using URLs ### Additional Context _No response_
Author
Owner

@AdiAr11 commented on GitHub (Jul 17, 2023):

Hi, does this issue still need to be fixed? I can work on it if its still need to be fixed. Thank you

<!-- gh-comment-id:1637955936 --> @AdiAr11 commented on GitHub (Jul 17, 2023): Hi, does this issue still need to be fixed? I can work on it if its still need to be fixed. Thank you
Author
Owner

@LucasXu0 commented on GitHub (Jul 17, 2023):

@AdiAr11 yes. Assigned it to you.

<!-- gh-comment-id:1637963840 --> @LucasXu0 commented on GitHub (Jul 17, 2023): @AdiAr11 yes. Assigned it to you.
Author
Owner

@AdiAr11 commented on GitHub (Jul 17, 2023):

@LucasXu0 Thank you !!

<!-- gh-comment-id:1637965705 --> @AdiAr11 commented on GitHub (Jul 17, 2023): @LucasXu0 Thank you !!
Author
Owner

@AdiAr11 commented on GitHub (Jul 17, 2023):

Hi @LucasXu0 , i found the callback for when the image url is not found in image_selection_menu.dart file. could you please tell me where the code for this dialog is?
I am thinking I would add a bool variable 'isUrlValid' in a provider class and change it to true if url is not valid and in catch block of the above mentioned file. then i would listen to the change in this bool value and display the 'Incorrect Link' text in the dialog.
Please let me know if you think it there is a better approach or something else that needs to be changed. Thanks

<!-- gh-comment-id:1638184422 --> @AdiAr11 commented on GitHub (Jul 17, 2023): Hi @LucasXu0 , i found the callback for when the image url is not found in image_selection_menu.dart file. could you please tell me where the code for this dialog is? I am thinking I would add a bool variable 'isUrlValid' in a provider class and change it to true if url is not valid and in catch block of the above mentioned file. then i would listen to the change in this bool value and display the 'Incorrect Link' text in the dialog. Please let me know if you think it there is a better approach or something else that needs to be changed. Thanks
Author
Owner

@LucasXu0 commented on GitHub (Jul 18, 2023):

@AdiAr11. Your approach sounds good to me. The code is located in image_upload_widget.dart, and you should submit the PR to this repo.

<!-- gh-comment-id:1639196921 --> @LucasXu0 commented on GitHub (Jul 18, 2023): @AdiAr11. Your approach sounds good to me. The code is located in `image_upload_widget.dart`, and you should submit the PR to this [repo](https://github.com/AppFlowy-IO/appflowy-editor).
Author
Owner

@AdiAr11 commented on GitHub (Jul 18, 2023):

@LucasXu0 @annieappflowy Created a PR in this mentioned repo :)

<!-- gh-comment-id:1639904134 --> @AdiAr11 commented on GitHub (Jul 18, 2023): @LucasXu0 @annieappflowy Created a PR in this mentioned [repo](https://github.com/AppFlowy-IO/appflowy-editor) :)
Author
Owner

@annieappflowy commented on GitHub (Nov 5, 2023):

Did you manage to get it merged, @AdiAr11 ?

<!-- gh-comment-id:1793754619 --> @annieappflowy commented on GitHub (Nov 5, 2023): Did you manage to get it merged, @AdiAr11 ?
Author
Owner

@AdiAr11 commented on GitHub (Nov 5, 2023):

@annieappflowy yes, that pr has been merged.

<!-- gh-comment-id:1793762618 --> @AdiAr11 commented on GitHub (Nov 5, 2023): @annieappflowy yes, that pr has been merged.
Author
Owner

@annieappflowy commented on GitHub (Nov 6, 2023):

@AdiAr11 , I can see that it would show "invalid image" after pressing "Enter"
Ideally, it should stay in the upload panel while showing "invalid image link". This way I can fix the image link right away.

<!-- gh-comment-id:1794035259 --> @annieappflowy commented on GitHub (Nov 6, 2023): @AdiAr11 , I can see that it would show "invalid image" after pressing "Enter" Ideally, it should stay in the upload panel while showing "invalid image link". This way I can fix the image link right away.
Author
Owner

@AdiAr11 commented on GitHub (Dec 3, 2023):

@annieappflowy sorry, I somehow missed your last comment.
https://github.com/AppFlowy-IO/appflowy-editor/pull/324
In this PR, the popup stays while showing "Incorrect link".

<!-- gh-comment-id:1837397957 --> @AdiAr11 commented on GitHub (Dec 3, 2023): @annieappflowy sorry, I somehow missed your last comment. https://github.com/AppFlowy-IO/appflowy-editor/pull/324 In this PR, the popup stays while showing "Incorrect link".
Author
Owner

@annieappflowy commented on GitHub (Dec 24, 2023):

todo: handle it in the menu without clicking the button
image

<!-- gh-comment-id:1868398610 --> @annieappflowy commented on GitHub (Dec 24, 2023): todo: handle it in the menu without clicking the button <img width="522" alt="image" src="https://github.com/AppFlowy-IO/AppFlowy/assets/12026239/91288a64-be12-498f-ad12-3fe71f3563b2">
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#956
No description provided.