nextcloud / nextcloud/viewer

Improve handling of prevent download permission

Open
#1,440 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
JavaScript
Stars
119
Forks
72
Avg merge
18h 42m
Merged PRs (30d)
24

Description

With https://github.com/nextcloud/server/pull/32482 using the viewer only works for apps like Collabora as for other filetypes like images the download to the users browser would be blocked if the download permission is removed from a share.

The error message for that is quite generic that it failed to load the file. In oder to improve the user experience, it would make sense to implement support for this in the viewer app.

Suggested implementation

In addition to the existing list of mime types for a handler, Collabora could pass over a list of mime types for "secure view". With this list, the viewer could check on the share attribute to see if download is disabled and then either show a proper fitting error message or still load the file if the handler supports the current mime type.

Any objections @skjnldsv @Raudius @CarlSchwan ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the viewer's existing handler MIME type list and how it reads the share's download permission. Trace the Collabora handler integration and determine how secure-view MIME types should be passed and checked. Done means supported files load when downloads are disabled, while unsupported files show a specific error instead of the generic load failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.