Skip to content

[Feature Request] Automatically grant public share permissions to images/resources embedded within a publicly shared Markdown document #56022

@zhuhaisto

Description

@zhuhaisto

问题描述(Description):​​
Currently, when a Markdown document is shared via a public link, the text content is accessible to anyone with the link. However, any images or other resources embedded within that document using internal paths (e.g., WebDAV links like /remote.php/dav/files/...) fail to load for anonymous users
. This happens because the permissions of the public share link for the document do not automatically extend to the resources it references.
While users can manually create public links for each image and update the Markdown source, this process is cumbersome and not intuitive, especially for documents with many images. It breaks the seamless collaboration experience that Nextcloud aims to provide.
​​提议的解决方案(Proposed Solution):​​
It would be greatly beneficial if Nextcloud could automatically handle the permissions for embedded resources when a document is publicly shared. Here are a couple of potential approaches:
​​Automatic Permission Inheritance (Preferred)​​: When a user creates a public share link for a Markdown (or other text-based) document, Nextcloud could automatically scan the document for references to other files within the same Nextcloud instance. It would then temporarily grant the public share link the necessary permissions to access those specific embedded files. The user wouldn't need to take any additional steps.
​​Smart Link Rewriting​​: Alternatively, when serving the publicly shared document, Nextcloud could automatically rewrite the internal file links (like WebDAV links) into the appropriate public direct links (appending /downloadto the resource's own share link)
. This could be done on-the-fly for the preview.
This feature would make public sharing of documents with embedded resources truly "what you see is what you get" and significantly improve the user experience for knowledge sharing and collaboration.
​​附加信息(Additional Context):​​
This is a common pain point for users who heavily rely on Markdown for documentation and knowledge management within Nextcloud.
The current workaround (manually creating public links for each image and updating the document) is error-prone and does not scale.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapenhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions