Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

let extensions register more flexible file open actions #5135

Closed

Description

@wkloucek

As an extension developer I want an extension to be able to:

  • Register a name per file extension: "open in x", where x is the name, eg: "open in Collabora" and "open in CodiMD" [full-ci] Internalize app provider #5805
  • Register a custom action name: "y in x", where y is the action name, eg: "open in x" or "edit in x" or "view in x" => needs
  • Register a file action dependent on the permissions on a file, usecase: if I received a share with viewer permissions I see only actions "view in x". Whereas when I received a share with editor permissions I also see the "edit in x" action => needs concepting
  • Load the list of available file extensions from a non static external endpoint (eg. the extensions api) => needs concepting

Activity

  1. wkloucek commented on May 21, 2021

    @wkloucek
    ContributorAuthor

    @kulmann The answer to all requests is currently not supported I suppose? ;-) Are there already plans to support it?

  2. kulmann commented on May 31, 2021

    @kulmann
    Contributor
    • Number 1) and 2) are easy, we can allow that file handlers define their own name for the action entirely.
    • For 3) we'd have to extend the first one even more and react differently depending on the permissions on the file. The resource (and with that the permissions) is available anyway, so we just have to come up with a reasonable mapping structure.
    • Number 4) needs changes in the way we load extensions. As of now only static code is possible in extension loading, but for making your request possible we need access to the store of the runtime. Needs concepting first (we have ideas about this but need to write them down).
  3. wkloucek commented on Aug 3, 2021

    @wkloucek
    ContributorAuthor

    A discussion with CERN today raised the question to not use the file extension but the mimetype from the propfind of a file when looking for the open in app action. This allows oCIS / REVA adminstrators to add custom mimetypes without changing the Web frontend. Should be easily doable, what do you think about this @kulmann?

    Example:
    mimetype application/vnd.oasis.opendocument.text is able to be opened in Collabora and OnlyOffice (Web gets this information from an API endpoint). Then it will get the mimetype for a particular file from the propfind information and can look up, what the user can be offered to open that file with. Currently an Web extension does this by providing the file extensions (eg. .odt) that it can open.

    CC @labkode @ishank011

  4. kulmann commented on Aug 3, 2021

    @kulmann
    Contributor

    Currently we're not using mime types in web, but they are available with the DAV property {DAV:}getcontenttype, so at least retrieving it would be easy.

  5. labkode commented on Aug 3, 2021

    @labkode
  6. kulmann commented on Aug 18, 2021

    @kulmann
    Contributor

    FTR: we have mime type now on resources:

    mimeType: resource.fileInfo[DavProperty.MimeType],

  7. wkloucek commented on Sep 30, 2021

    @wkloucek
    ContributorAuthor

    can this be closed after #5805 is merged or are there open points?

  8. pascalwengerter commented on Oct 1, 2021

    @pascalwengerter
    Contributor

    can this be closed after #5805 is merged or are there open points?

    I've refactored the acceptance criteria in this ticket and so far we've only checked the first box ;) the other ones needs further concepting and backend changes (not sure if oCIS/Reva/... though)

  9. wkloucek commented on Mar 20, 2024

    @wkloucek
    ContributorAuthor

    @kulmann does this ticket still have some right to exist? The last comment was already in 2021...

  10. kulmann commented on Aug 7, 2024

    @kulmann
    Contributor

    We didn't go the way to customize the action name (e.g. differentiate between Open or Edit), but I feel that this doesn't bring too much value or might even confuse some users. However, viewers, editors and actions (with custom labels) can be developed as apps and installed easily into ocis, see https://owncloud.dev/services/web/#web-apps
    We even build a first iteration of an App Store for web now, where available apps can be discovered easily (at the moment only download + manual installation). I think we can close here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions