decaporg/decap-cms

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

Pageboy opened this issue · 3 comments

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

Screenshot 2021-07-01 at 10 21 43

I can fix this issue

Suggestion:

From an end user's perspective if the "Copy path" function used the "public_folder" vs the "media_folder" suffix this could match usage for wanting to link to a PDF or non image media item using the "link" button from the markdown editor.