Cockpit-HQ / Cockpit

Cockpit Core - Content Platform
https://getcockpit.com
Other
388 stars 47 forks source link

How to use a full path url of asset in API? #71

Open heiyoo opened 1 year ago

heiyoo commented 1 year ago

Hi,

If I create a content item with rich text filed, and insert a image from Assets. Then in the API get-content-item, the field uses a relative path of the image like: "content": "

<img src=\"/cockpit/storage/uploads//2023/01/23/test.jpg" alt=\"karting-post.jpg\">

"

So in my application I can't get the full url of the image, if I re-write the image src which seems not a nice solution...

My question is how to configure the system to use a full path of asset in the API such as 'GET /content/item/{model}/{id}'? Thanks in advance.