files_pdfviewer icon indicating copy to clipboard operation
files_pdfviewer copied to clipboard

Disable pdf viewer on files that have download disabled

Open juliusknorr opened this issue 2 years ago • 5 comments

We should not attempt to open the pdf viewer for files that have download disabled as it fails to download the file from webdav

Ref https://github.com/nextcloud/server/pull/32482#issuecomment-1218387463

juliusknorr avatar Aug 26 '22 07:08 juliusknorr

Related to the discussion we had @Raudius about making Collabora the default viewer in this case.

juliusknorr avatar Aug 26 '22 07:08 juliusknorr

Related to the discussion we had @Raudius about making Collabora the default viewer in this case.

Oh I wish if that's possible, specially for PDF files

elhananjair avatar Aug 26 '22 14:08 elhananjair

  • [ ] Block opening pdf files with the disabled download permission
  • [ ] Using collabora as a default just in this case is hard, as the viewer doesn't have proper logic for checking the file with custom callbacks at opening
    • [x] We go for just registering Collabora as default for pdf if files_pdfviewer is disabled

juliusknorr avatar Aug 30 '22 08:08 juliusknorr

There is also an inconsistency in how "Allow download/Hide download" works with internal vs email shares. For email shares, there is a "Hide download" checkbox, which, while checked, allows the share-receiving user to view the PDF file without allowing to download it. The PDF viewer seems to be different for internal vs email share.

allexzander avatar Jan 05 '23 11:01 allexzander

Is there a workaround instead of using collabora? I will not switch to collabora now. The "Allow download"-function does not work anymore. Is it possible to switch to the "Hide download"-function?

strangmann avatar Aug 24 '23 17:08 strangmann