Virtual file system for plugins

Hello, I wrote a plugin that allow me to insert the microphone audio into a note (like obsidian)
In desktop I can write the audio file to disk, and then post it as resource:

        const resource = await joplin.data.post(
          ['resources'],
          null,
          { title: fileName, mime: finalMimeType },
          [{ path: tempFilePath }]
        );

In mobile this doesn't work because I can't use node apis, I tried sending the file Blob directly but the api doesn't support this

There is a mention here of virtual files Web app | Joplin this theoriticly can resolve this issue, but I didn't find a way to use it , is this accessible to plugins ?

What do you mean ? Some screen copies ?

Here is a screencast

Note that attaching an audio recording to a note is already supported on mobile, under Attach => Record audio.

I think that's from pre-release 3.3, but it will be available soon

1 Like

Thank you for the feature request!

A few related notes:

  • The Joplin 3.3 mobile pre-release has an audio recorder built-in.
  • At least on Android, the <WebView used to run plugins uses a file:// URL. As a result, the Android system WebView sets isSecureContext to false and limits the available APIs — audio recording might not work.
    • Some work marking the plugin background page as a secure context was done on this branch, but this change was Android-specific and isn't actively being worked on.
  • Extending virtual files to other platforms could make sense, but it would require some refactoring. At present, virtual files are web only (relevant code).
1 Like

Thanks for the replies, that clears all the points I asked about, I can just use the built-in recorder when its released.

Thank you for the screencast.

If I understand correctly this plugin works with the destop version and not with the mobile version.
And for the mobile version something similar is already going from joplin's devs.
Will you share your nice plugin for users of desktop version of Joplin (at least while there's nothing for desktop from joplin devs) or do you give up ?
We are a lot to wait for this function in Joplin. This function exists in Notion from a long time...

Here it is GitHub - sigmaSd/joplin-record-plugin: This plugin allows you to record audio directly within Joplin using your system's microphone. The recording is then saved as a resource (attachment) to the current note, and a Markdown link to the recording is inserted.

If you run into issues feel free to discuss them on the reop, since I haven't tested it that much

1 Like

Cool ! Very nice of you.
I had a look at the link you gave me.
What is the exact name of the plugin ?
I can't see it in the list


I will give you a feed back asap. I will use JOPLIN 3.3.4 portable on WINDOWS 11 first and try Linux (KUBUNTU) after.
What is the link of the reop ?
Again : thanks a lot.

Thats the source code, I added automatic ci builds now, you can just download the jpl file from here https://github.com/sigmaSd/joplin-record-plugin/releases/download/1.1.0/io.sigmasd.record.jpl
To install it go to settings -> plugins -> click on the wheel icon -> install from file -> select the jpl file -> restart

Now you can run toogle audio record command to start and stop recording

1 Like

Thanks !!!

WINDOWS 11 & JOPLIN 3.3.4






Seems working perfectly...

Just one thing:
With


the [ENTER] doesn't work in order to validate "STOP". It works with

I fixed that in version 1.2.0 Release 1.2.0 · sigmaSd/joplin-record-plugin · GitHub

And created a new thread for the plugin Showcase: Plugin to record audio directly within Joplin using your system's microphone

1 Like

Thanks a lot : it works !
Still testing...