I am still in dev but suddenly I had problems to upload files to the site folder.
I created a setup with a media section in the site element where all files should be stored. This worked for a while but now I get errors and I can’t wrap my head around it to find the source.
This is the error that I get when I try to upload a file:
Error: this file cannot be created
When I try to change the text in one of the existing files in the .txt
file it get this error:
Error: Unauthenticated
I can create files on other pages.
This is the media section in the site.yml
:
label: Medien
icon: file-image
columns:
- width: 1/2
sections:
allImages:
label: " "
type: files
template: image
# query: site.index.files #look for images outsite of the site element
layout: cards
size: tiny
image:
cover: true
- width: 1/2
sections:
pdfs:
label: " "
type: files
template: pdf
image:
cover: true
The image file template file/image.yml
:
title: Image
accept:
extension: jpg, png, webp
fields:
alt:
label: Alt Text
type: text
width: 1/2
required: true
caption:
label: Caption
type: textarea
width: 1/2
And this is the fields/images.yml
field that I extend everywhere on the page where images are used:
label: Bilder
type: files
query: site.images.filterBy('template', 'image')
uploads:
parent: site
template: image
image:
cover: true
ratio: 3/2
Has anybody ever experienced something similar?
It looks like there is an issue with the rights to write in this folder or on the server but I have no plan how these things work.