Skip to content
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

Image path of exported image is wrong #2785

Open
jiangliux opened this issue Jan 10, 2019 · 11 comments
Open

Image path of exported image is wrong #2785

jiangliux opened this issue Jan 10, 2019 · 11 comments
Labels
bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work.

Comments

@jiangliux
Copy link

jiangliux commented Jan 10, 2019

Current behavior

when export note as markdown file with local image, the image file in the attachment will be exported as
dst_folder/attachment/b77fc476.png, but the image path in the markdown file is not consistent with actual path, is dst_folder/attachment/cd4f570c-3dd9-42b7-8f4a-08a2b4c8d093/b77fc476.png

Expected behavior

no need to modify the markdown path manually.

Steps to reproduce

Assume that ${NOTE_NAME} denotes to the current note name.

  1. Paste a image file in the note, and new image file will be stored into attachments/${NOTE_NAME}/${IMAGE_NAME} , ${IMAGE_NAME} denote the generated image name.
  2. Then export this note as markdown file to a new folder.
  3. image file will be exported as attachments/${IMAGE_NAME}, but the code in the markdown file remains ![](attachments/${NOTE_NAME}/${IMAGE_NAME}), so the image can't be properly displayed.So I have to manually delete the ${NOTE_NAME} part to make it works.

Environment

  • Version : 0.11.12.0
  • OS Version and name : Windows 10
@jiangliux jiangliux changed the title export markdown export markdown with local image Jan 10, 2019
@ZeroX-DG ZeroX-DG added the needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. label Jan 10, 2019
@ZeroX-DG
Copy link
Member

Can you provide steps to reproduce the error?

@jiangliux
Copy link
Author

jiangliux commented Jan 10, 2019

Can you provide steps to reproduce the error?

@ZeroX-DG sure, I add some detailed description.

@utotch
Copy link

utotch commented Jul 15, 2019

I have the same problem when I simply export a single note to a markdown file.

image files are exported to "attachments" folder, but paths in a markdown are not updated and wrong.
e.g. a path looks like

[e60b4f55.png](:storage/597a1f9e-f176-45b5-b5c2-a607829bb1bc/e60b4f55.png)

and it is not updated to "attachments" folder.

--
environment

Boostnote 0.11.17
Mac OS 10.14.4

@kan1Go
Copy link

kan1Go commented Oct 19, 2019

Hi,

I have exactly the same problem. Do you have a plan to fix this issue?


Env

BoostNote Version 0.13.0 (0.13.0)
Mac OS Version 10.15

@Flexo013 Flexo013 added bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work. and removed needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. labels Oct 20, 2019
@Flexo013
Copy link
Contributor

I have just tested this on Windows 10 and exporting a note with images produces the following code in the .md file:

...
## Image
![36f5d8bc.png](:storage\fa37dce2-8783-4b66-b5ce-5d8f41ba4aec\36f5d8bc.png)

![fb4cc4b9.png](:storage\fa37dce2-8783-4b66-b5ce-5d8f41ba4aec\fb4cc4b9.png)

![3d9e3606.png](:storage\fa37dce2-8783-4b66-b5ce-5d8f41ba4aec\3d9e3606.png)
...

These links will indeed not work, because the note name is no longer present after the export.

@Flexo013 Flexo013 changed the title export markdown with local image Image path of exported image is wrong Oct 20, 2019
@marcodings
Copy link

In addition when exporting a "storage" to markdown, no attachments are exported at all !, no attachment folders are created in the respectively exported boostnote folders.

@Flexo013
Copy link
Contributor

Flexo013 commented Nov 1, 2019

@marcodings Thanks for the report! I have created a separate Github issue for this problem #3336. Because the cause of your problem is different from the one mentioned in this issue. (Attachment link formatting, versus attachment presence in export).

@AlfredoGJ
Copy link

Hello, guys, I have replicated this same issue in BoostNote 0.13.0 and Mac OS 10.15, if you plan to fix this issue it would be a great opportunity for me to start contributing to this project. Let me know so I can create a PR.

@Flexo013
Copy link
Contributor

@AlfredoGJ I don't quite understand. Do you wish to contribute by making a PR that fixes this issue or will you start contributing once we have fixed this issue?

In case of the former, then feel free to submit one as soon as works for you. Anybody is welcome to provide fixes/solutions to the open GitHub issues! :D

@AlfredoGJ
Copy link

Sorry, I meant I wish to contribute by fixing this issue. I' will start working on in. Thank you very much

@AlfredoGJ
Copy link

Hey guys, can you provide some feedback about the PR I sent for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work.
Projects
None yet
Development

No branches or pull requests

7 participants