为什么我不能通过Netlify CMS查看媒体并将其上传到Netlify Large Media?

时间:2019-08-09 20:24:20

标签: netlify netlify-cms

我正在尝试设置Netlify Large Media以与我的Netlify CMS配置一起使用。回购中的媒体已通过Git LFS上载,但是尝试在Netlify CMS中查看媒体时没有显示任何内容。

我的最佳猜测是Netlify Git Gateway出了点问题-但这都是使用GitHub API令牌设置的。我假设Netlify会自动使用该令牌,但是我不需要这样做。

我的config.yml如下:

backend:
  name: git-gateway

media_folder: "static/img"
public_folder: "/img"

打开Netlify CMS时,我在控制台中看到一个TypeError

mediaLibrary.js:230 TypeError: Cannot read property 'map' of undefined
    at S (netlify-lfs-client.js:158)
    at Object.getResourceDownloadURLArgs (netlify-lfs-client.js:239)
    at implementation.js:374
    at /admin/async https:/unpkg.com/netlify-cms@2.9.7/dist/netlify-cms.js:234
(anonymous) @ mediaLibrary.js:230

如果我尝试上传图像,则会得到另一个TypeError

Uncaught (in promise) TypeError: Cannot read property 'find' of undefined
    at mediaLibrary.js:246
    at index.js:8
    at redux.js:462
    at MediaLibrary.js:145
    at Object.<anonymous> (react-dom.production.min.js:14)
    at f (react-dom.production.min.js:15)
    at react-dom.production.min.js:15
    at S (react-dom.production.min.js:17)
    at k (react-dom.production.min.js:18)
    at T (react-dom.production.min.js:18)

这很可能是Netlify本身的错误-尽管我对此表示怀疑,因为我怀疑这种用例非常普遍。 我的存储库在https://github.com/MichaelDono/michaeldono.com/

是开源的

0 个答案:

没有答案