decaporg / decaporg/decap-cms

Copy Path does not reflect the real path of the object in the media folder

Open
#5,569 3 comments 2 reactions 1 assignee Claimed by @DenysLins View on GitHub
area: media-library type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

In the media box there is a useful Copy Path button. So, if someone adds a PDF to the media library and they want a link to it, then the `Copy Path` could be a useful thing. However, the issue is that the path copied starts **uploads** when it should start **/uploads**. Of course I can get my user to add the / but I wonder why this happening since the backend specifically says:

`media_folder: "/uploads"`

Steps to reproduce the behavior. For example:
1. Go to 'Media'
2. Select any image or file
3. Click on Copy Path
4. Use this path in a link
5. The link is wrong because the path should reflect the path that is specified in the backend

**Screenshots**

![Screenshot 2021-07-01 at 10 21 14](https://user-images.githubusercontent.com/619455/124100314-48e5e280-da56-11eb-95c6-ca32152aa152.png)

![Screenshot 2021-07-01 at 10 21 43](https://user-images.githubusercontent.com/619455/124100377-54390e00-da56-11eb-862c-b9a773ab0baa.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.