Invalid file type

Why I cannot upload .woff2 file format? I could before…

type : files
headline : Files
type : files
empty : Maybe words are all you need…
sortBy : filename desc
template : default
limit : 16
cover : true
back: transparent

The by default uploadable files have been restricted. You now have to set additional allowed filetypes in your file blueprint. See the changelog…

Also checkout accept option on file blueprint

What should I write;
accept: image/jpeg, image/png, woff2 ?

Okay I got it. Thank you so much Bora

Similar problem here.

Would like to make a pgp-publik-key uploadable via the panel.

   type: files
   multiple: false
       extension: asc

I would expact this to work, but it doesn’t. :face_with_head_bandage:

I ran into the “invalid filetype” error message on a windows server in a case where I create a temporary file using tmpfile().

The temp-file has a .tmp extension on windows:





I get image data from an API and load it into Kirby like this:

$temp = tmpfile();
fwrite($temp, $imageResponse);
	'source' => stream_get_meta_data($temp)['uri'],
	'template' => 'product-title-image',
	'filename' => $filename

The $filename contains the correct extension (example: db141370.jpg) so I didn’t expect that Kirby would have a problem here.

Took quite some time to debug this. In order to allow both cases I created a file-blueprint and set accept: true to disable the filetype-check.

1 Like
  1. you have to use a section
  2. you have to apply a template to the uploaded files:
    headline: PGP Key
    type: files
    max: 1
    template: pgp-key
  1. You have to create create the file blueprint pgp-key.yml and add accept: asc there.