Netlify-cms: 2.0 regression: Git Gateway with GitHub backend can't upload images to Media

Created on 30 Jul 2018  路  4Comments  路  Source: netlify/netlify-cms

- Do you want to request a feature or report a bug?
Bug
- What is the current behavior?
Trying to use Netlify CMS with Vuepress. Currently having an issue when uploading media files. I keep getting this issue

screen shot 2018-07-30 at 10 50 44

in the console it errors out with:

screen shot 2018-07-30 at 10 53 50

I thought it might be an issue with the public and media folder paths in config.yml but after trying out a few different paths I have had no luck

- If the current behavior is a bug, please provide the steps to reproduce.
clone repo, add to netlify, create an identity (instructions in the repo's readme) and then try uploading an image.
- What is the expected behavior?
An image uploads successfully.

- Please mention your versions where applicable.

Netlify CMS version: netlify-cms 2.0.6
Browser version: Chrome version 68.0.3440.75

Operating System: Mac OS High Sierra 10.13.4

- Please link or paste your config.yml below if applicable.

backend:
  name: git-gateway
  branch: master

publish_mode: editorial_workflow
media_folder: "docs/.vuepress/public/images"
public_folder: "images"

collections:
  - name: "doc"
    label: "Doc"
    folder: "docs"
    create: true
    slug: "{{slug}}"
    fields:
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Body", name: "body", widget: "markdown"}
extensionbackends bug

All 4 comments

An update on this, by changing the admin index.html from:

<!doctype html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Content Manager</title>
    <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>

<body>
    <!-- Include the script that builds the page and powers Netlify CMS -->
    <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>

</html>

to

<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Content Manager</title>

  <!-- Include the styles for the Netlify CMS UI, after your own styles -->
  <link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/cms.css" />
  <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>


</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/[email protected]/dist/cms.js"></script>
</body>
</html>

It now lets me upload media files. I'm wondering if there are some breaking changes which has caused this issue

Got the same, fixed the same way.

Same issue. Fixed with the version downgrade for now as well. My site repo is hosted on github using netlify git-gateway for auth.

Was this page helpful?
0 / 5 - 0 ratings