-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
area: extensions/backends/giteatype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Hi! I'm facing an error, it's my first time using Decap.
Describe the bug
I've created a collection with a specific path, when i try to create a new object in the admin it keeps loading with an error in console:
GET https://mygitea.com/api/v1/repos/myname/myrepo/git/trees/blog:blog%2Fcontent%2Fblog%2FDRAFT_MEDIA_FILES 400 (Bad Request)
If I remove the collection "path" and media folders, all works as expected.
To Reproduce
Create a collection with this config in a Gitea backend
backend:
name: gitea
repo: my-user/my-repo
app_id: my-app-id
api_root: https://mygitea.com/api/v1
base_url: https://mygitea.com
auth_endpoint: https://mygitea.com/login/oauth/authorize
branch: blog
site_url: http://localhost
display_url: https://your-site.com
media_folder: "blog/static/uploads"
public_folder: "static/uploads" # la ruta d'imatges que posa decap
collections:
- name: "blog"
label: "Blog"
folder: "blog/content/blog"
path: '{{year}}/{{month}}/{{slug}}/content'
media_folder: ''
public_folder: ''
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Rating (scale of 1-5)", name: "rating", widget: "number" }
- { label: "Body", name: "body", widget: "markdown" }
Expected behavior
Allow me to create a collection object and store images in "{{year}}/{{month}}/{{slug}}/content"
Applicable Versions:
- decap-cms-app 3.3.3
- decap-cms-core 3.4.2
- decap-cms 3.3.3
- Git provider: Gitea
MoriTanosuke
Metadata
Metadata
Assignees
Labels
area: extensions/backends/giteatype: bugcode to address defects in shipped codecode to address defects in shipped code