Upload from frontend does not work for many file types

Hi there,

on my page I have a front page uploading feature that should allow to upload all sorts of files (basically the user should be user to choose any file type). This works for “standard” file formats like images, zip-files, PDFs and so on.

But if I try this with more exotic files (like .json or .mkv), on my route the uploading returns with an error Invalid file type: -.

I have seen some forum posts here that have a similar issue, where such files cannot be uploaded to the panel and in this case, the options can be changed in the blueprint. But as I am dealing with a front-end upload here, I don’t know: is there some Kirby internals that prevent such an upload? And if so, can I somehow change the options for that to allow the upload of any file?

Thanks!

Front-end upload to a page using Kirby’s methods does exactly the same as when you upload via the Panel, so the same rules apply.

I’m afraid, I don’t quite understand.

I neither have page blueprints nor file blueprints on my site. Do I need to create some to make this work? So I need to set up a blueprint for the page the files are uploaded to? Like the page where I run the createFile() method on? How do I then connect a file blueprint with an accept option to that page if I don’t have a files field there?

Yes, by default Kirby limits file uploads to certain types.