[GH-ISSUE #3526] [Bug] Upload new cover "Invalid url" #1596

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

Originally created by @Xazin on GitHub (Sep 25, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3526

Originally assigned to: @amgenene on GitHub.

Bug Description

When trying to upload a cover by URL, I get the error "Invalid URL".

How to Reproduce

  1. Open AppFlowy
  2. Navigate to any Document
  3. Change Cover
  4. Add new
  5. Insert this URL https://cdn.britannica.com/29/529-050-6B31311A/Angora-goat.jpg
  6. Press Add
  7. Receive "Invalid URL"

Expected Behavior

  1. Open AppFlowy
  2. Navigate to any Document
  3. Change Cover
  4. Add new
  5. Insert this URL https://cdn.britannica.com/29/529-050-6B31311A/Angora-goat.jpg
  6. Press Add
  7. Cover is added to library and selected as cover

Operating System

MacOS

AppFlowy Version(s)

0.3.2

Screenshots

Screenshot 2023-09-25 at 10 29 33

Additional Context

No response

Originally created by @Xazin on GitHub (Sep 25, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3526 Originally assigned to: @amgenene on GitHub. ### Bug Description When trying to upload a cover by URL, I get the error "Invalid URL". ### How to Reproduce 1. Open AppFlowy 2. Navigate to any Document 3. Change Cover 4. Add new 5. Insert this URL `https://cdn.britannica.com/29/529-050-6B31311A/Angora-goat.jpg` 6. Press `Add` 7. Receive "Invalid URL" ### Expected Behavior 1. Open AppFlowy 2. Navigate to any Document 3. Change Cover 4. Add new 5. Insert this URL `https://cdn.britannica.com/29/529-050-6B31311A/Angora-goat.jpg` 6. Press `Add` 7. Cover is added to library and selected as cover ### Operating System MacOS ### AppFlowy Version(s) 0.3.2 ### Screenshots <img width="1367" alt="Screenshot 2023-09-25 at 10 29 33" src="https://github.com/AppFlowy-IO/AppFlowy/assets/42929161/9c84df91-8a63-432f-8bec-8dd007cc7fda"> ### Additional Context _No response_
mirror 2026-03-23 20:51:31 +00:00
Author
Owner

@duckcommit commented on GitHub (Sep 29, 2023):

@Xazin Hey, could you please tell me where this file is located? Having trouble finding the function. I could try to fix this bug.

<!-- gh-comment-id:1740372879 --> @duckcommit commented on GitHub (Sep 29, 2023): @Xazin Hey, could you please tell me where this file is located? Having trouble finding the function. I could try to fix this bug.
Author
Owner

@Xazin commented on GitHub (Sep 29, 2023):

@Xazin Hey, could you please tell me where this file is located? Having trouble finding the function. I could try to fix this bug.

Hey Duckcommit, you can use the Widget inspector to quickly locate widgets, which also leads to their respective onPressed/onTap functions.

See appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_editor.dart line 232, it will lead you to line 68 where the cover picker is.

appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart

<!-- gh-comment-id:1741557367 --> @Xazin commented on GitHub (Sep 29, 2023): > @Xazin Hey, could you please tell me where this file is located? Having trouble finding the function. I could try to fix this bug. Hey Duckcommit, you can use the Widget inspector to quickly locate widgets, which also leads to their respective onPressed/onTap functions. See `appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_editor.dart` line 232, it will lead you to line 68 where the cover picker is. `appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/custom_cover_picker.dart`
Author
Owner

@amgenene commented on GitHub (Oct 2, 2023):

Hey @Xazin is this still an issue? When I add the photo to Change Cover function I am seeing the picture of a goat.
image
and then you need to Save the file to the Gallery, and from there it will apply that to be the cover. One thing I'm seeing in the code that may be an issue _getPreviouslyPickedImagePaths function. The reason I think there is an issue here is because when I added that goat image as the cover locally, then went to change the cover to something else, and then wanted to change the cover again the function _getPreviouslyPickedImagePaths led me to believe that there would an option to pick the goat image that I had previously uploaded as the new cover, but that was not the case, please let me know if the issue I just pointed out is a bug or not. @duckcommit

<!-- gh-comment-id:1743512258 --> @amgenene commented on GitHub (Oct 2, 2023): Hey @Xazin is this still an issue? When I add the photo to Change Cover function I am seeing the picture of a goat. ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/26441666/60703cbb-be43-443c-8ad4-f407dbec6e4a) and then you need to Save the file to the Gallery, and from there it will apply that to be the cover. One thing I'm seeing in the code that may be an issue _getPreviouslyPickedImagePaths function. The reason I think there is an issue here is because when I added that goat image as the cover locally, then went to change the cover to something else, and then wanted to change the cover again the function _getPreviouslyPickedImagePaths led me to believe that there would an option to pick the goat image that I had previously uploaded as the new cover, but that was not the case, please let me know if the issue I just pointed out is a bug or not. @duckcommit
Author
Owner

@Xazin commented on GitHub (Oct 2, 2023):

Hey @Xazin is this still an issue? When I add the photo to Change Cover function I am seeing the picture of a goat. image and then you need to Save the file to the Gallery, and from there it will apply that to be the cover. One thing I'm seeing in the code that may be an issue _getPreviouslyPickedImagePaths function. The reason I think there is an issue here is because when I added that goat image as the cover locally, then went to change the cover to something else, and then wanted to change the cover again the function _getPreviouslyPickedImagePaths led me to believe that there would an option to pick the goat image that I had previously uploaded as the new cover, but that was not the case, please let me know if the issue I just pointed out is a bug or not. @duckcommit

What you explained should be a different bug, if you can fix it then we'd be very happy as well.

It's where an uploaded image does not "show up" in the cover library, but it does exist, (you can delete it), but the thumbnail isn't displaying.

<!-- gh-comment-id:1743559068 --> @Xazin commented on GitHub (Oct 2, 2023): > Hey @Xazin is this still an issue? When I add the photo to Change Cover function I am seeing the picture of a goat. ![image](https://user-images.githubusercontent.com/26441666/272049852-60703cbb-be43-443c-8ad4-f407dbec6e4a.png) and then you need to Save the file to the Gallery, and from there it will apply that to be the cover. One thing I'm seeing in the code that may be an issue _getPreviouslyPickedImagePaths function. The reason I think there is an issue here is because when I added that goat image as the cover locally, then went to change the cover to something else, and then wanted to change the cover again the function _getPreviouslyPickedImagePaths led me to believe that there would an option to pick the goat image that I had previously uploaded as the new cover, but that was not the case, please let me know if the issue I just pointed out is a bug or not. @duckcommit What you explained should be a different bug, if you can fix it then we'd be very happy as well. It's where an uploaded image does not "show up" in the cover library, but it does exist, (you can delete it), but the thumbnail isn't displaying.
Author
Owner

@amgenene commented on GitHub (Oct 2, 2023):

Screenshot 2023-10-02 at 2 42 33 PM

Just to make sure I understand and we are on the same page before I take a stab at this for the picture above the trash icon I circled, and the clear all works, but you are saying it doesn't exist in the "cover library" (or in other words the area I highlighted yellow)?

<!-- gh-comment-id:1743582022 --> @amgenene commented on GitHub (Oct 2, 2023): <img width="1505" alt="Screenshot 2023-10-02 at 2 42 33 PM" src="https://github.com/AppFlowy-IO/AppFlowy/assets/26441666/efbbcf5d-98fe-4e4a-88c8-f835d0487ec1"> Just to make sure I understand and we are on the same page before I take a stab at this for the picture above the trash icon I circled, and the clear all works, but you are saying it doesn't exist in the "cover library" (or in other words the area I highlighted yellow)?
Author
Owner

@amgenene commented on GitHub (Oct 2, 2023):

@Xazin

<!-- gh-comment-id:1743582276 --> @amgenene commented on GitHub (Oct 2, 2023): @Xazin
Author
Owner

@Xazin commented on GitHub (Oct 2, 2023):

@Xazin

When adding an image there, to the right of the + button where you click to add an image, there should be the thumbnail of the image you just uploaded.

When hovering there after uploading an image, you can see the Trash icon-button to delete that specific image, but as you can see the thumbnails don't show up in your version.

<!-- gh-comment-id:1743661703 --> @Xazin commented on GitHub (Oct 2, 2023): > @Xazin When adding an image there, to the right of the `+` button where you click to add an image, there should be the thumbnail of the image you just uploaded. When hovering there after uploading an image, you can see the `Trash` icon-button to delete that specific image, but as you can see the thumbnails don't show up in your version.
Author
Owner

@amgenene commented on GitHub (Oct 2, 2023):

@Xazin Ahh ok gotcha I understand now can I be assigned this issue?

<!-- gh-comment-id:1743696993 --> @amgenene commented on GitHub (Oct 2, 2023): @Xazin Ahh ok gotcha I understand now can I be assigned this issue?
Author
Owner

@Xazin commented on GitHub (Oct 2, 2023):

@Xazin Ahh ok gotcha I understand now can I be assigned this issue?

Assigned

<!-- gh-comment-id:1743703315 --> @Xazin commented on GitHub (Oct 2, 2023): > @Xazin Ahh ok gotcha I understand now can I be assigned this issue? Assigned
Author
Owner

@amgenene commented on GitHub (Oct 3, 2023):

@Xazin I had some interesting findings, firstly for macOs I was having some issues consistently running the project because it was complaining about the MACOSXDEPLOYMENTTARGET being 10.11 when the project was only targeting 10.13+ another thing that was peculiar is that after updated my computer's software and I locally ran a dart fix --dry-run and then dart fix --apply I didn't see the bug anymore even after I attempted to git restore all of my files can you also make sure that your machine is up to date and let me know if you see the same issues I may try re-pulling the code and try to see if I can reproduce the issue

<!-- gh-comment-id:1745518222 --> @amgenene commented on GitHub (Oct 3, 2023): @Xazin I had some interesting findings, firstly for macOs I was having some issues consistently running the project because it was complaining about the MACOSXDEPLOYMENTTARGET being 10.11 when the project was only targeting 10.13+ another thing that was peculiar is that after updated my computer's software and I locally ran a dart fix --dry-run and then dart fix --apply I didn't see the bug anymore even after I attempted to git restore all of my files can you also make sure that your machine is up to date and let me know if you see the same issues I may try re-pulling the code and try to see if I can reproduce the issue
Author
Owner

@Xazin commented on GitHub (Oct 3, 2023):

@Xazin I had some interesting findings, firstly for macOs I was having some issues consistently running the project because it was complaining about the MACOSXDEPLOYMENTTARGET being 10.11 when the project was only targeting 10.13+ another thing that was peculiar is that after updated my computer's software and I locally ran a dart fix --dry-run and then dart fix --apply I didn't see the bug anymore even after I attempted to git restore all of my files can you also make sure that your machine is up to date and let me know if you see the same issues I may try re-pulling the code and try to see if I can reproduce the issue

That is just a warning, it doesn't cause the build to fail. I know because I see it everyday...

<!-- gh-comment-id:1745521256 --> @Xazin commented on GitHub (Oct 3, 2023): > @Xazin I had some interesting findings, firstly for macOs I was having some issues consistently running the project because it was complaining about the MACOSXDEPLOYMENTTARGET being 10.11 when the project was only targeting 10.13+ another thing that was peculiar is that after updated my computer's software and I locally ran a dart fix --dry-run and then dart fix --apply I didn't see the bug anymore even after I attempted to git restore all of my files can you also make sure that your machine is up to date and let me know if you see the same issues I may try re-pulling the code and try to see if I can reproduce the issue That is just a warning, it doesn't cause the build to fail. I know because I see it everyday...
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#1596
No description provided.