laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.96k stars 4.99k forks source link

External attachment editor does not have permission to edit attachment #6084

Closed DJTimoy closed 2 years ago

DJTimoy commented 2 years ago

Environment

Joplin version: 2.6.8 Platform: Android OS specifics: LG G7 ThinQ

Steps to reproduce

  1. File is attached in note
  2. Long-tap the image to "open" it (like right-clicking on desktop)
    • Joplin should be monitoring the file for changes. it works on PC, does it not work on Android?
  3. Open the image with an app capable of editing images. ERROR - no permission (see log below)

(4. Edit the image in external app & save) (5. Attachment is updated.)

Describe what you expected to happen

Attachment to be updated.

I can work around this by just creating a new note from the editor with the updated file and deleting the old one.

Logfile

Android displays an error: An error occurred: java.lang.SecurityException: UID 10388 does not have permission to content://net.cozic.joplin.provider/files/c04daf96cea742d2a0ee75611e64c36d.png [user 0]

roman-r-m commented 2 years ago

Joplin should be monitoring the file for changes. it works on PC, does it not work on Android?

Nope, is never been designed for this.

I experimented with sharing editable resources to other apps but it requires the receiving app's cooperation. For images I couldn't find an app that can edit an image and save it back to the original URL, though admittedly I've only tried 2 or 3 of them. What they do is instead save modified image somewhere to the storage and there's no way for Joplin to know where.

I suppose it still can be done but Joplin needs to copy the resource somewhere it can be accessed by other apps and then monitor for changes.

graphit0 commented 2 years ago

Ok, as a slightly hacky workaround you can use Attaché plugin (see "Mobile drawing update" section) for updating attachments:

  1. you setup an additional sync between plugin folder and an android folder (via FolderSync or Syncthing)
  2. You save the edited attachments in the android folder
  3. Next time you'll run desktop Joplin, the attachments will be updated in the notes

In the future if mobile plugins project succeeds, the 1 and 3 steps would be no longer needed but for now you can get yourself accustomed with the plugin workflow

DJTimoy commented 2 years ago

nice, thanks for the trick!

In the future if mobile plugins project succeeds,

I'm praying for the future development of Joplin.. the market is fierce right now but I'm hoping, as more people get in to digital workspaces, worthy developers will step up and git 'er done!