Opening attached files at Android

Hi all,

I have been looking for some easy way to open attached files on my Android phone. For example I would like open a concert ticket (pdf file) which I have added. Because it has a barcode I cant just copy and paste the text.
At this moment I get (as expected) the message: “The Joplin mobile app does not currently support this type of link: resource” when I try to open the file in the Android app.

I have found a workaround, but its not pretty. It requires finding the file in the .resource folder, which is hard with the naming convention. And then share it so I can save it on my phone. After adding “.pdf” to the file I can open it.

Does anyone know some other possibilities?

a request has been made yesterday for that here

I have seen it :slight_smile: Thx!

Until the implementation I would be happy if there is an easier workaround available.

may be a pdf reader that could opened the file once downloaded without digging in the deep folders ?

I love that in windows, if Joplin itself can’t handle an attachment, it just launches the default associated application.
Is there no way to replicate such behaviour in android? I often attach sound snippets (mostly mp3s), and while I don’t mind Joplin not being able to play it in an embedded player, I’d like to be able to play it in an external app with a single tap.

Logger mentioned PDF as an example, but the request should be general, for files of any format.

What about opening a separate request to just launch any file (of any format) with any valid application for their mime type? (The standard Android Intent.ACTION_VIEW.)


That would be so fine :slight_smile:
But in the meantime I am still happy with Joplin so far...what a great work!

If someone has a workaround available I am still interested :slight_smile:

I would like to open the attached pictures in an external app on Android the way it’s done in the desktop app. Now sharing the pictures placed inside of a note is quite difficult on mobile. Or I just haven’t figured it out properly. Looking the picture up in my Nextcloud folder is not an option 'cause my notes are encrypted.

Hi Ipra, how does this work in the desktop app? Right mouse button and save picture? On android you could make a printscreen and share it.

Thanks for replying. I found a way to open quickly. Just erase the exclamation mark in the beginning of the name of the attachment. After that pressing the link opens in an external app right away.

Hi, firstly thanks for the outstanding app(s)!

Actually, I noticed a similar issue when opening “.sdoc” files on Android. “.sdoc” file is an export file/archive from Samsung Notes. However, when opening the link to this file from a Joplin note, the Joplin app does not show the Samsung Notes as one of the apps in the “Open with” option.

I should note that I am using encryption with my notes. But, this issue only happens with the “.sdoc” files, other links or files (e.g. PDF) work correctly so I do not think it is a problem with this.

Device: Galaxy Note 9
OS: Android 9
Joplin app version: 1.0.252

Thanks very much for looking into this.

Joplin version 1.7.3
Android version 11
Pixel 3a

Right now I can't find any way of viewing pdf attachments on my phone. It's a pretty big issue because I can see myself having saved a ticket or something and not being able to show it. This means I wont be able to use Joplin to store important documents, for fear of not being able to get them when I need them.

I would be willing to help with this issue, but I would need some help getting started.

Atm when I try to open a pdf on my phone my password manager and a music app are the only two options for opening the file. They naturally don't have the capability to display pdf:s.

I suspect this might be because the file is recorded with incorrect mime type.Do you remember if you attached it on mobile on desktop?
Try attaching another pdf and see if it has the same issue.

Sorry for the late reply. I made the attachments on mobile, in the Android app. Attachments made on desktop work fine. Also, the attachments made on mobile work on desktop as well.
The problem persists with opening attachments made on mobile, on mobile. The issue seems to reoccur when making new attachments on mobile.

What about pdf files shared to Joplin? Is there an issue for these?

Can you also try this:

  • find the id of an attachment that you can't open
  • since you say you have desktop as well i assume you have some sync set up? can you try finding a file named <id from the 1st step>.md in your sync target (in Dropbox that would be under Apps/Joplin)
  • paste the content here (there shouldn't be any sensitive info aside from the file name maybe)

There are many posts on attachments and related problems. In this post :

There I have tried to summarize the situation as you can see. I think it would help (the dev and other readers) if you added your problems and remarks to that post, so it gets back on top of the discourse thread list from time to time.
I have also added the bugs from that post/table to "issues" on github. But since the table includes issues/bugs and feature requests, it is important to keep that thread alive too.

Here is the contents of the md file in Dropbox of a file that I can't open on mobile:

id: 251133ac8977462ebd8ec2f503bc2389
mime: application/pdf
created_time: 2021-02-01T17:04:12.122Z
updated_time: 2021-02-01T17:04:12.122Z
user_created_time: 2021-02-01T17:04:12.122Z
user_updated_time: 2021-02-01T17:04:12.122Z
file_extension: documentsdocumentdoc
encryption_applied: 0
encryption_blob_encrypted: 0
size: 3817900
is_shared: 0
type_: 4

Here's the contents of a file that I can open:

id: f8f68508b0484195b96ec65ca8dcbc65
mime: application/pdf
created_time: 2021-02-09T10:50:14.596Z
updated_time: 2021-02-09T10:50:14.596Z
user_created_time: 2021-02-09T10:50:14.596Z
user_updated_time: 2021-02-09T10:50:14.596Z
file_extension: pdf
encryption_applied: 0
encryption_blob_encrypted: 0
size: 651975
is_shared: 0
type_: 4

It looks like the file extension is the culprit.

1 Like

I thought I have fixed it in this PR and the first version to contain the fix seems to be 1.6.7.

The fix won't apply retroactively for any attachments that have been broken previously but in your case the created_time is relatively recent. Are you sure it's been attached with Joplin version more recent than 1.6.7?

The earliest version with the fix is 1.7.1, not 1.6.7

The version of the Android app that I used is 1.7.5. It might have received one or two updates since I made the attachment, but it was probably up to date at the time of creation.

However, I just tried attaching the same file again and this time it worked fine. Another weird thing is that I remember the link being nameless the first time I made the attachment, but this time it took the filename as the link name.

Anyway, if the problem shows itself again I will make another post, but I consider it solved. Thanks for all your help!

I think this problem is not yet resolved for attachments. It manifest for me on my Android client irrespective irrespective of desktop or mobile client. Details of My setup is as follows:

Desktop Client Version: Joplin 2.5.12 (prod, linux)
Mobile Client Version: Joplin 2.6.3
Android Version: 11
Build Number: Oxygen OS

Some of the examples are as follows:

id: 0a7a283318c84cdc93cc99a2c8dbfdd5
mime: application/pdf
created_time: 2021-03-20T05:59:22.234Z
updated_time: 2021-03-20T05:59:22.234Z
user_created_time: 2021-03-20T05:59:22.234Z
user_updated_time: 2021-03-20T05:59:22.234Z
file_extension: documentsdocumentmsf
encryption_applied: 0
encryption_blob_encrypted: 0
size: 655018
is_shared: 0
type_: 4
id: 0ab6f2ca67074488953f18a57d689950
mime: application/pdf
created_time: 2021-03-25T21:04:49.650Z
updated_time: 2021-03-25T21:04:49.650Z
user_created_time: 2021-03-25T21:04:49.650Z
user_updated_time: 2021-03-25T21:04:49.650Z
file_extension: pdf
encryption_applied: 0
encryption_blob_encrypted: 0
size: 91115
is_shared: 0
type_: 4

I hope this helps in narrowing down the issue. Ready to provide more details if required.