Refering to files with relative path in markdown only works for images or via editor workflow

Steps to reproduce

  1. Create subfolder in Folder
  2. Add image.jpg and text.pdf to subfolder
  3. Write markdown file in Folder

README.md

![myimage](subfolder/image.jpg)

![mytext](subfolder/text.pdf)

Expected behaviour

When viewing README.md in the Web UI of owncloud markdown is automatically rendered.
The image.jpg is displayed and the text.pdf is displayed as inline download link.

Actual behaviour

When viewing README.md in the WebUI of owncloud markdown is automatically rendered
The image.jpg is displayed but the text.pdf is not displayed. Instead an error is displayed for not finding the file. (look at that cutie)

Additional Info

When using the functionallity of the WebUI editor to “add attachement” and choose the text.pdf file from subfolder, a hidden .attachments.4778598Folder is created under Folder and a line will be added to the markdown file

README.md

![myimage](subfolder/image.jpg)

![mytext](subfolder/text.pdf)

![text.pdf](.attachments.4778598/text.pdf)

Then the text.pdf File is displayed as an inline Download link

Also other files i then place manually in the .attachements folder will be displayed correctly.

So clearly relative links work, files are accessible (image is displayed), but not for other files.
Why is that? It seems like a weird restriction and breaks my workflow somehow.

**nextCloud version:27.1.6

Also when using the Android Nextcloud version, the attachments are only displayed correctly when they are located in this hidden .attachments folder.
If they are located on any other folder, they will be shown as file error you showed