Understanding the proper way to handle attachements ("assets")

hope that the answer is not “logseq is not the right tool for you”…

actually I want to have only one tool to store my knowledge base, don’t want to lookup several apps to find the needed information
this not only includes text but also PDFs, pictures, Screenshots etc
examples of content could be hardware inventory including picture of the device and PDF of the manual, or PDF books / articles with some comments or links to other pages (eg an article on ssh with links to other pages about ssh) also sometimes I capture the screen of PCs with my mobile phone’s camera when selecting text and doing copy/paste is not possible (eg sitting in front of servers) and only add small amount of text to it - one picture tells more than thousand words

I’ve seen that there is the assets directory but in my understanding it lacks structure. meaning files are stored flat and I would have to take care of name de duplication, proper naming (to prevent having files named screenshot1.png lying around with no human-visible connection to a specific page) etc
maybe what I’m looking for is a kind of page-linked assets directory, but I understand that this would be the least efficient implementation

so am I a weirdo trying to store kind of multimedia content in logseq or how do others do?

many thanks

3 Likes

Managing files is a legitimate use case in my opinion and I’m going to explore it more too.

Did you already notice that you can change the path of an asset manually?

I mean, when you upload an asset you will get a link like this:

[Name.pdf](../assets/Name_1658000515517_0.pdf)

If in your assets folder you create a subfolder you can edit the link like the following:

[Name.pdf](../subfolder/Name_1658000515517_0.pdf)

(notice that it’s ../subfolder/ and not ../assets/subfolder/ in the link above as one would expect, I don’t know why).

Maybe you can move all the files you want to manage into the assets folder and manually link them in Logseq when needed instead of using the Upload an asset command?

Is this enough to address your use case?


Edit: don’t forget that URLs work too, so you can link files on a web server too. For example the following PDF can be annotated as a local one:

![Analytic Geometry](https://www.math.uni-bonn.de/people/scholze/Analytic.pdf)
1 Like

I may not be understanding your problem, but in my opinion I don’t care what the folder structure looks like in assets. The human visible connection in my opinion all happens in Logseq itself.

Once I attach a file I have no issue ever finding it because I can search the tags, page refs etc.

I lose lots of items on my desktop but once I add a pdf to Logseq its instantly retrievable in my opinoin.

In addition to the human readability, there is also the issue of accidentally creating file names that are too long or too long for other programs to properly handle, or folders that have too many items, as discussed in the thread below.

Human readable names are definitely a big plus, especially to re-use the assets by name in other blocks without having to copy links to cryptic filenames, but first Logseq should guarantee that its storage is technically sound and nothing breaks years down the road on another device.

2 Likes

As the OP I just wanted to thank you for the feedback. Conclusion is that there doesn’t seem to be a prefered nor “official” way, it has to be defined by each user.
Still playing around with lopgseq but with low prio / available time.
Digging a bit more into the topic, I’m trying to find out what’s the best way to structure my assets directory and linking intomy notes
Will post here when I’ve made up my mind and found a way to go

You’re not weird. This is why I’m still mostly using Obsidian over Logseq: Obsidian has a better and more consistent philosophy; just like it’s based on markdown for human readability, it fully respects the file system and directory structure for human organization.

1 Like

Honestly, I don’t even think any user of Logseq should be thinking about “how to structure their assets”.

While it is ok for Logseq to have a folder where you put the files that have no other home, everyone already has tens of thousands of files on their disks, and users can’t be expected to put everything into some new structure Logseq likes.

Many other programs also made this mistake, which makes it impossible to interface with other programs that also want to own all of your data.

Take for example Zotero, they have a good case for having their assets all in a single storage folder. Unfortunately Logseq can’t have relative paths to these files, so they either have to be duplicated, or use absolute paths, which is too fragile:

Similarly the widely used e-book management program Calibre does not permit linking to outside files at all, which makes it close to impossible to annotate Calibre books in Logseq.

In my opinion, Logseq should re-think their asset strategy and try to become as non-intrusive as possible and seamlessly fit into existing OS folder structures.

Logseq should not only do relative paths by default, but there should be a way to change and fix those paths should a user decide to move their external folders around.

3 Likes

I’d like to continue using Logseq (haven’t tried Obsidian), but have a problem that for many pages I have a need to attach a diagram attached to them, usually created as a screenshot of some other program’s output. Those attachments are then placed together with audio/video files and everything is stored under my filesystem. It goes like /home/userid/Documents/somesubfolder/examples/example-abc/. However, when I attach screenshot image to my Logseq page, then all those folders (/home/, /home/userid, /home/userid/Documents etc.) are created as nodes in my Logseq graph which I’d like to prevent. They are just storage hierarchy in my filesystem and not something which adds logical value to my personal knowledge database. Moreover, I do anticipate having a lot of such note pages created during my study work and those extra notes will just create a noise which I’d like to prevent.

Any hint how to properly handle it in Logseq?

How is such a case handled in Obsidian?

Sincerely,
Saša

1 Like

@gour regarding the issue with the directories created as pages : instead of creating links as file:///home/userid/… simply write them as file:/home/userid/… worked for me

1 Like

Those paths are completely ignored. But I can’t even reproduce what you’re saying of the behavior in Logseq. When I drag an asset into a page, I don’t get the parent folders created as nodes. Can you give a screenshot?

Thanks a lot - it works for me as well!

Just use the example as mentioned by @jhf2442 .

Here it is: