You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm hooking up the Neflify/Decap CMS with a NextJS blog and ran into a "Failed to persist entry: TypeError: Failed to fetch" notification with the Image widget in association to the ContentSecurityPolicy.
To Reproduce
Steps to reproduce the behavior. For example:
In markdown editor click "Choose an image"
Select image from desktop
Click on 'upload'
Click on 'choose selected'
In markdown editor click "Save"
UI displays "Failed to persist entry: TypeError: Failed to fetch" alert
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
media_folder: "public/uploads" # Where media files will be stored
public_folder: "/uploads" # Where the media files can be accesed from the server
publish_mode: editorial_workflow # For Drafts
collections:
- name: "links" # Used in routes, e.g., /admin/collections/blog
label: "LOTW" # Used in the UI
folder: "data/links" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{day}}-{{month}}-{{year}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- { label: 'Title', name: 'title', widget: 'string' }
- { label: 'Tags', name: 'tags', widget: 'list' }
- { label: "Publish Date", name: "date", widget: "datetime", date_format: "DD.MM.YYYY" }
- { label: 'Image', name: 'image', widget: 'image' }
- { label: 'Body', name: 'body', widget: 'markdown' }
Additional context
Error is probably how i've amended the ContentSecurityPolicy and possibly easy to solve (but thought i'd share with the community because i've ran out of time today)
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm hooking up the Neflify/Decap CMS with a NextJS blog and ran into a "Failed to persist entry: TypeError: Failed to fetch" notification with the Image widget in association to the ContentSecurityPolicy.
To Reproduce
Steps to reproduce the behavior. For example:
Expected behavior
"Save" function saves markdown post as draft
Screenshots
https://global.discourse-cdn.com/netlify/original/3X/3/9/3950311e20c9ee91172cba8cdae4e02d206620ec.jpeg
Applicable Versions:
CMS configuration - config.yml
next.config.js example
Screenshot
https://global.discourse-cdn.com/netlify/original/3X/3/9/3950311e20c9ee91172cba8cdae4e02d206620ec.jpeg
Additional context
Error is probably how i've amended the ContentSecurityPolicy and possibly easy to solve (but thought i'd share with the community because i've ran out of time today)
The text was updated successfully, but these errors were encountered: