You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Public link root reports public-link-item-type "folder" for links to a single file #3693
For a public link to a single file, the root of the public link reports oc:public-link-item-type = folder (the virtual folder that contains the file). Folder links report folder as well, so clients can't tell from the link root whether a link points to a file or a folder.
Web needs that to hide actions that are a dead end on single-file links, e.g. "Insert image from cloud" in the text editor: the file picker can only show the shared file itself there (opencloud-eu/web#3631, opencloud-eu/web#3632). For now, web hides the action on all public links, also on folder links where picking an image from the shared folder would be useful.
Steps to reproduce
Create a public link for a single file, e.g. form.pdf (here with a password).
The link root reports the type of the shared item: file for a link to a single file, folder for a link to a folder (the entries inside keep reporting their own type).
Actual behavior
Both report folder for the root:
Link
/public-files/<token>/
entries
single file form.pdf
folder
form.pdf: file
folder with form.pdf, image.png
folder
form.pdf: file, image.png: file
(For OCM single-file shares, web already handles the root being reported as file, see packages/web-client/src/webdav/listFiles.ts.)
Setup
opencloudeu/opencloud-rolling:daily, product version 8.1.0+fbb0aff1, started with the docker compose setup of the web repository (docker-compose.yml).
Additional context
If reporting file for the root isn't desired, another property of the link root that tells the shared item's type would work for web as well.
Activity