Image uploaded to a branch does not load in decap
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
I added a feature in a website that we build where users will be able to submit entries to a certain collection by using a form available (semi-)publicly. Images uploaded using that form will be saved to the PR that I create in the backend.
Here [an example](https://github.com/opendata-swiss/metadata.swiss/pull/63/files#diff-35159296a44785c052e4f472c6af486adc4863c88831a9921da11070de13ee27R4) of such a PR.
You can see the [rendered result](https://cms-2fshowcases-2fstarter-code-fuer-alle.piveau-ln-preview.zazukoians.org/de/showcase/starter-code-fuer-alle-csv-datensaetze-auf-opendata.swiss). We use nuxt.
However, decap tries to load the image from the `main` branch when opening this for editing
**Expected behavior**
Images added to a draft should be loaded from the matching branch in decap.
**Screenshots**
**Applicable Versions:**
- Decap CMS version: decap-cms-app 3.8.4 decap-cms-core 3.9.0
- Git provider: GitHub
**CMS configuration**
I removed all but the collection in question
```yaml
backend:
name: github
repo: opendata-swiss/metadata.swiss
squash_merges: true
publish_mode: editorial_workflow
media_folder: "public/img/uploads"
public_folder: "/img/uploads"
i18n:
structure: multiple_files
default_locale: de
locales: [de, fr, it, en]
collections:
- name: Showcases
label: "Showcases"
label_singular: Showcase
folder: "opendata.swiss/ui/content/showcases"
i18n: true
extension: md
widget: "list"
create: true
fields:
- label: Active
name: active
widget: boolean
default: true
i18n: duplicate
- label: Title
name: title
widget: string
i18n: true
- label: Image
name: image
widget: image
i18n: duplicate
- label: Website
name: url
widget: string
i18n: duplicate
required: false
- label: Category
name: categories
widget: piveau-vocabulary
multiple: true
i18n: duplicate
piveau:
search: https://piveau-hub-search-ln.zazukoians.org/
vocabulary: data-theme
- label: Type of content
name: type
widget: select
i18n: duplicate
options:
- label: "Application"
value: application
- label: "Data Visualization"
value: data_visualization
- label: "Event"
value: event
- label: "Blog/Article"
value: blog_and_media_articles
- name: datasets
label: Datasets
widget: piveau-dataset
multiple: true
i18n: duplicate
required: false
piveau:
search: https://piveau-hub-search-ln.zazukoians.org/
- name: tags
label: Tags
widget: list
- name: body
label: Body
widget: markdown
i18n: true
```
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.