mickstar / Zoo-For-Zotero

This is an Android app for viewing Zotero libraries.
562 stars 53 forks source link

Understanding Attachments #168

Open markNZed opened 2 years ago

markNZed commented 2 years ago

Hi, I am unsure how Zoo for Zotero should work with WebDAV so I'm unsure if I'm seeing bugs. I am using WebDAV to store attachments. When I tap on an item in the library I get lots of details about the item and a link to the PDF attachment. When I tap on the PDF a popup "Downloading File" appears, the attachment is download to the Downloads directory and the PDF opens in a PDF reader (NeoReader on a BOOX Note2). I then annotate the PDF and the annotations are saved into the PDF file in the Downlaods directory. Zoo for Zotero does not upload the modified file, if I use the "Force Re-upload" option in the Attachment popup (that appears when I long press the attachment in the detailed view of the item, within Zoo for Zotero) then I think it uploads another file, not the file that is in the Downloads directory. (I guess it is uploading a cached version of the file.)

There is an Attachment Downloader feature that does not download all the files due to errors.

In Settings there is "Attachments Location" that can be set to External Cache or Custom Path. I am not sure what this does but I guess it species the location where the Attachment Downloader puts the attachments. I am not sure where External Cache points (should this be Internal Cache?) Whether this is set to one option or the other I get a lot of errors when trying to download using the Attachment Downloader.

It seems to me that Zoo for Zotero is keeping a copy of downloaded PDF in a cache. But it is not opening those PDFs and instead downloads the attachment to the Downloads directory. Then it uploads changes to the cached file, rather than changes to the file in the Downloads directory.

How should we use Zoo for Zotero with WebDAV if we want to annotate the PDF and have Zoo for Zotero upload the modified PDF?

Thanks!

mickstar commented 2 years ago

I believe you may be using a pdf editor that edits a copy of the file and leaves the original intact. Try a test annotation using XoDo pdf editor and see if zoo picks it up.

External cache is a directory in the android folder of your storage, and custom can be put anywhere, though is much slower due to needing to use the storage access framework

On Fri, 20 May 2022, 10:24 pm markNZed, @.***> wrote:

Hi, I am unsure how Zoo for Zotero should work with WebDAV so I'm unsure if I'm seeing bugs. I am using WebDAV to store attachments. When I tap on an item in the library I get lots of details about the item and a link to the PDF attachment. When I tap on the PDF a popup "Downloading File" appears, the attachment is download to the Downloads directory and the PDF opens in a PDF reader (NeoReader on a BOOX Note2). I then annotate the PDF and the annotations are saved into the PDF file in the Downlaods directory. Zoo for Zotero does not upload the modified file, if I use the "Force Re-upload" option in the Attachment popup (that appears when I long press the attachment in the detailed view of the item, within Zoo for Zotero) then I think it uploads another file, not the file that is in the Downloads directory. (I guess it is uploading a cached version of the file.)

There is an Attachment Downloader feature that does not download all the files due to errors.

In Settings there is "Attachments Location" that can be set to External Cache or Custom Path. I am not sure what this does but I guess it species the location where the Attachment Downloader puts the attachments. I am not sure where External Cache points (should this be Internal Cache?) Whether this is set to one option or the other I get a lot of errors when trying to download using the Attachment Downloader.

It seems to me that Zoo for Zotero is keeping a copy of downloaded PDF in a cache. But it is not opening those PDFs and instead downloads the attachment to the Downloads directory. Then it uploads changes to the cached file, rather than changes to the file in the Downloads directory.

How should we use Zoo for Zotero with WebDAV if we want to annotate the PDF and have Zoo for Zotero upload the modified PDF?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/mickstar/Zoo-For-Zotero/issues/168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAV2V5F5FYSUHUMAWHSVGLVK6ABBANCNFSM5WPJU35Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

markNZed commented 2 years ago

Thanks for taking a look. I can confirm that the PDF editor is inserting annotations into the PDF because, at the moment, I need to manually transfer the PDFs from the Android eReader's Download directory to Zotero on my laptop. I see the annotations in the PDFs on the laptop after this.

So the cache is external to the Zoo for Zotero app but internal to the Android OS. Maybe "External cache" would be better names "Default cache location". In any case I will use "External cache". It does seem to be faster.

Do you know where I can see more information about the errors reported when it fails to download some attachments?

It looks like there is a pull request with some changes to WebDAV "implemented webdav uploading and change detection for webdav" https://github.com/mickstar/Zoo-For-Zotero/pull/46/commits/2106c965a0a1c72d72a8e6e31f4992230d5dac98

I wonder if the pull request will get in any time soon?

[edit] It looks like the External Cache is /Android/data/com.mickstarify.zooforzotero/cache on my device

markNZed commented 2 years ago

It seems the PDF is transferred from the External Cache to the Download folder by the NeoReader App, before opening the PDF there. This sux and is not the fault of Zoo. I want to use NeoReader because it has good integration for handwriting recognition on the eReader. So I've changed my work flow to using ZotFile and I'm syncing the files with NextCloud. It may be possible to launch the PDF reader from Zoo in such a way that it does not make a copy and works on the original. I think this issue can be closed.

Zoo for Zotero was very useful for me and it is sad that I can't use it any longer. Thanks very much for making Zoo available and best wishes.

rvlander commented 1 year ago

I had a similar issue with Adobe Reader and using Custom Path Setting solved the issue.

Sherry520 commented 1 year ago

I have had the same confusion.