BoostNote-Legacy icon indicating copy to clipboard operation
BoostNote-Legacy copied to clipboard

Image link failed to load images in the images/ folder

Open shelper opened this issue 8 years ago • 27 comments

Current behavior

I have Boostnote storage setup in dropbox folder as : dropbox/boostnote. and there is a folder called images, where when i copy and paste the image to boostnote notes, the image will be named and saved. and in my notebook, a markdown link will be generated as: ![filename](\:storage\filename.png)

it was working well and recently after i upgrade boostnote, it seems the program cannot recognize and load the image correctly from the path now. the behavior of pasting an image to notebook also changed as it now saves the image in the folder attachments under boostnote, and generate the link with a full absolution path to the image file.

Expected behavior

Steps to reproduce

Environment

  • Version : 0.11.5
  • OS Version and name : windows 7 pro

shelper avatar Jun 01 '18 23:06 shelper

I also have the same issue with 11.5 Win 10 pro

benscabbia avatar Jun 02 '18 10:06 benscabbia

Same issue... Using windows 10. Was working perfectly until last update.

VMDS-GE avatar Jun 03 '18 15:06 VMDS-GE

Same here - images that were previously displayed in notes are now broken

image

derekantrican avatar Jun 04 '18 15:06 derekantrican

I'm pretty sure it's the bug mentioned here

I wonder how much longer before it gets fixed. Having to downgrade to the previous version every day (as it keeps updating itself) is getting very tiring.

iamaleaf avatar Jun 06 '18 04:06 iamaleaf

Same here

image

the images was broken .. i lose all~~~

wuliqiangqiang avatar Jun 13 '18 10:06 wuliqiangqiang

@wuliqiangqiang no, you have not lost the images. They aren't shown at the moment.. That is not the same. It will (hopefully) be fixed in the next version. @Rokt33r can say when that will be :)

ehhc avatar Jun 13 '18 11:06 ehhc

@ehhc thank you for you effort! But it is really sad that maintainers don't care - second release without fix, and users need to again downgrade to 0.11.4 to have a images. cc @Rokt33r

michal-organek avatar Jun 14 '18 09:06 michal-organek

@f4il It actually works now, you just need to manually move the image files from the images folder to the attachments folder. I did that and they're displayed now.

iamaleaf avatar Jun 14 '18 10:06 iamaleaf

@f4il @iamaleaf it should be fixed by now.. the images should be moved automatically by my fix which is contained in the newst build.. Do you get an error in the developer console?

ehhc avatar Jun 14 '18 10:06 ehhc

@ehhc Mine is fixed now, but I had to move the images myself. I updated, restarted a few times and the migration didn't happen so I moved them myself and now it works. Thanks!

iamaleaf avatar Jun 14 '18 11:06 iamaleaf

@ehhc, Thanks for the fix, however, the problem seems to persist, the image files are still in the images/ folder and are not automatically moved to associates folders in the attachments/.

allenkuocode avatar Jun 17 '18 23:06 allenkuocode

Here's an alternate fix for people who are comfortable with the command line:

Debugging

  • If you look at your notes with broken images in edit mode, you'll notice that the images are represented as a path to /:storage/0.xxx.png. These images do not load.
  • If you add a new image to the same note, you'll notice that the image has a path that looks like :storage/<key>/xxx.png (notice the missing leading slash compared to the old path). You'll also find the image in a similar path under attachments. So this means :storage actually points to the attachments folder.
  • Your paths may vary depending on your application version.

Fix

  1. First, move all your images into the attachments folder.
  2. Then, you'll need to remove the leading slash from all the image paths in all your notes. You can do this by going into your notes folder and running:
sed -i '' 's/\/:storage/:storage/g' *

That command will work on OSX. You'll have to figure out the equivalent sed command for Linux. For Windows, well, ~~fuck Windows~~ you can try using cygwin or torture yourself by working out the Powershell version.

As a last note, yes, this sort of upgrade bug is unacceptable. It doesn't inspire much confidence in the team behind this. I will be moving all my notes to Dropbox Paper .

kohenchia avatar Jun 18 '18 02:06 kohenchia

@kohenchia i fear the problem is not one of the team but of me for not properly testing my refactoring.. (resp. for forgetting to test the "migration" at all..). I'm sorry for that..

ehhc avatar Jun 18 '18 06:06 ehhc

@ehhc: so what we can do now???? I met the same issue.

hminle avatar Jun 20 '18 03:06 hminle

I'll look around from today and the next week. (I have to go Chiana for a business trip from Thursday to Sunday.)

I'm really sorry. I was too busy to take care of this project... But, the urgent tasks are finished. And, we're trying to find how could we make us focus on Boostnote.

Rokt33r avatar Jun 20 '18 03:06 Rokt33r

@boostio funded this issue with $30. Visit this issue on Issuehunt

IssueHuntBot avatar Jun 20 '18 14:06 IssueHuntBot

Maybe it is fixed by this? https://github.com/BoostIO/Boostnote/pull/2107 @Rokt33r ?

ehhc avatar Jun 20 '18 14:06 ehhc

@ehhc I need to know how can I reproduce the problem. Could you tell me the scenario what the PR supposes to fix?

Rokt33r avatar Jun 20 '18 17:06 Rokt33r

@Rokt33r probably you need to:

  • install Boostnote in version <= 0.11.4
  • create new note, and paste from clipboard some images to note
  • check preview - images should be there
  • update to newer version
  • check again the note again - images should be broken.

michal-organek avatar Jun 21 '18 07:06 michal-organek

@michal-organek , Hi, do you still keep your storage folder before <= 0.11.4? It would be awesome if you can share it here :smile:

richardtks avatar Dec 17 '18 11:12 richardtks