Add support for imported_url, linked_file and improve support for inline attachments#47
Closed
OptionalLion411 wants to merge 2 commits into
Closed
Add support for imported_url, linked_file and improve support for inline attachments#47OptionalLion411 wants to merge 2 commits into
OptionalLion411 wants to merge 2 commits into
Conversation
`length` property is optional and for linked files, there is a `path` property
…attachments only inline supported attachments like pdf and images include all attachment types (new: `linked_file`, `imported_url`)
Author
|
Also, @benjypng, is there any reason why you are currently not taking in any pull requests, like stated in the README.md? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added support for all types of attachments that occur in Zotero (this is the only place where they are mentioned in the official documentation).
This combines the features of #32 and #38. So this correctly handles
imported_file(already implemented)imported_url(files, that are downloaded from the web, but locally stored, mostly usinig the Browser Extension)linked_url(also already partially implemented, but I added support for content type and more complex URL which are possible to occur)linked_file(files, that are not stored within Zotero, but where a link in the local filesystem exists)For each of this types, Zotero stores the
Content-Typeof the attachment. In the settings, we already have the option whether links should be handled inside (inline) Logseq or outside. Currently, when enabled, the plugin tries to handle all types of files within Logseq, which does not work. For example, linked Latex documents can't be handled by Logseq and errors occur.This pull request adds checks for the Content-Type and only inlines supported files.
I am not sure why the previous pull request did not get merged, because for me the addressed issues affect more than 50% of all my entries in Zotero. So if you need any further examples or debug logs of the JSON provided by the API, feel free to request this.
In the end I just want to say thank you for the really great plugin and all your efforts to already port it to the DB version!