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

**URL:** <https://help.nextcloud.com/t/refering-to-files-with-relative-path-in-markdown-only-works-for-images-or-via-editor-workflow/183122>\
**Category:** ℹ️ Support\
**Tags:** nc27, files-markdown-app\
**Created:** [February 23, 2024, 1:20pm UTC](https://help.nextcloud.com/t/refering-to-files-with-relative-path-in-markdown-only-works-for-images-or-via-editor-workflow/183122 "2024-02-23T13:20:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bastiman1](https://help.nextcloud.com/letter_avatar/bastiman1/32/6_22734026db12803ebb3e059622ac3534.png) [@bastiman1](https://help.nextcloud.com/u/bastiman1)\
**Post date:** [February 23, 2024, 1:20pm UTC](https://help.nextcloud.com/t/refering-to-files-with-relative-path-in-markdown-only-works-for-images-or-via-editor-workflow/183122/1 "2024-02-23T13:20:28Z")

</div>

### 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

```auto
![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)

 ![fail](https://help.nextcloud.com/uploads/default/original/3X/c/6/c691d23ae248409045ddac7fdb85959145e989ae.jpeg)

### 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

```auto
![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

 ![success](https://help.nextcloud.com/uploads/default/original/3X/f/e/fe2a270aff6667dc78696a1aa2d3523ca66b8e1d.jpeg)

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

---

<div class="post-metadata">

**Author:** ![suka97](https://help.nextcloud.com/letter_avatar/suka97/32/6_22734026db12803ebb3e059622ac3534.png) [@suka97](https://help.nextcloud.com/u/suka97)\
**Post date:** [May 30, 2024, 1:22pm UTC](https://help.nextcloud.com/t/refering-to-files-with-relative-path-in-markdown-only-works-for-images-or-via-editor-workflow/183122/2 "2024-05-30T13:22:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:43am UTC](https://help.nextcloud.com/t/refering-to-files-with-relative-path-in-markdown-only-works-for-images-or-via-editor-workflow/183122/3 "2025-01-16T08:43:25Z")

</div>


