Code Monkey home page Code Monkey logo

Comments (10)

rxliuli avatar rxliuli commented on June 12, 2024 1

Steps 1-5 above are canceled. You can download this zip and unzip it to get the tgz file, then use yarn add -D ./joplin-blog-0.7.0.tgz to install and regenerate to test it?

joplin-blog-0.7.0.zip


Modified a bit, now it will print the file name and extension to be copied

from joplin-utils.

rxliuli avatar rxliuli commented on June 12, 2024

Check if the file /Users/huy/.config/joplin-desktop/resources/7de408d4ec98e0fa8314c6b092156956.jpg exists

from joplin-utils.

huyz avatar huyz commented on June 12, 2024

/Users/huy/.config/joplin-desktop/resources/7de408d4ec98e0fa8314c6b092156956.jpg

I did. I already listed the output of ls above in my bug description. The file exists and I'm able to open it and see the image with macOS Preview app.

from joplin-utils.

rxliuli avatar rxliuli commented on June 12, 2024

/Users/huy/.config/joplin-desktop/resources/7de408d4ec98e0fa8314c6b092156956.jpg

I did. I already listed the output of ls above in my bug description. The file exists and I'm able to open it and see the image with macOS Preview app.

Sorry, I was too careless, can you try to run it locally?

  1. git clone https://github.com/rxliuli/joplin-utils.git
  2. cd joplin-utils/
  3. yarn && yarn setup
  4. cd apps/joplin-blog/
  5. edit
    const fileName = resource.id + '.' + resource.file_extension
  6. yarn build
  7. cd
  8. yarn add -D /apps/joplin-blog
  9. yarn joplin-blog blog

Editing Application.ts refers to printing fileName and resource.file_extension. I observed that the file name reported by the error seems to lack an extension, and the extension is obtained through joplin api. Maybe, this may be joplin itself An error

from joplin-utils.

rxliuli avatar rxliuli commented on June 12, 2024

If it is wrong, please try to use the most primitive api to obtain it (replace id and token by yourself), observe the file_extension field in the result, if there is no value, please report to joplin official.

curl 'http://localhost:41184/resources/<id>?fields=id,title,file_extension&token=<token>'

In addition, you can also try one of the simplest solutions, delete the image from this note, and then copy the picture from it and paste it again. Have a good time.

from joplin-utils.

huyz avatar huyz commented on June 12, 2024

Yeah, the file_extension field is missing from the DB. These are the attachments that succeeded plus the one that failed:
2021-10-04 Joplin DB resources screenshot

But I have a lot of attachments that have an empty filename_extension

from joplin-utils.

rxliuli avatar rxliuli commented on June 12, 2024

But I have a lot of attachments that have an empty filename_extension

Then you may need to report a bug to the official, which is obviously a mistake

from joplin-utils.

huyz avatar huyz commented on June 12, 2024

Unfortunately, Laurent is pointing me back to the joplin-utils repo: laurent22/joplin#5528 (comment)

So I'm stuck with no permanent solution. I guess I will have to hack my database to make it look ok.

from joplin-utils.

rxliuli avatar rxliuli commented on June 12, 2024

I have implemented a function to automatically repair file extensions based on mime in batches, you can try it

https://joplin-utils.rxliuli.com/web/joplin-batch-web/#/en-US/fixFileExtension

from joplin-utils.

huyz avatar huyz commented on June 12, 2024

@rxliuli Thanks for your efforts. I've actually decided to switch to Obsidian for now.

from joplin-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.