最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

如何在 Strapi 自定义 API 中发送媒体

网站源码admin39浏览0评论

如何在 Strapi 自定义 API 中发送媒体

如何在 Strapi 自定义 API 中发送媒体

[详细信息=“系统信息”]

  • 4.9:
  • Ubuntu:
  • MySQL:
  • 18.5: 我对带有媒体的表格的自定义 api 插件有错误
    Cannot set properties of undefined (setting 'image')

如果我从终点移除媒体,它会完美地工作

端点的结构是

{
  "populate": [
    {
      "media": [
        {
          "name": "image",
          "selected": true
        },
        {
          "name": "backgroundImage",
          "selected": true
        }
      ],
      "table": "MPCarousel",
      "fields": [
        {
          "name": "id",
          "selected": true
        },
        {
          "name": "title",
          "selected": true
        },
        {
          "name": "createdAt",
          "selected": false
        },
        {
          "name": "updatedAt",
          "selected": false
        }
      ]
    }
  ]
}
回答如下:
发布评论

评论列表(0)

  1. 暂无评论