Frontend permission for file upload?

I know about but even if there are images, the upload permission might have changed by the user.

Is it possible to check permission for the current page file upload on the frontend? Or do I need to parse the blueprint?

With permission you mean file permissions (chmod) or settings from the blueprint (files: false)?

The core does not know anything about blueprints except for the path to the blueprints directory, because blueprints are a Panel feature.

You can use kirby()->roots()->blueprints() . DS . $page->template() . '.php' to get the path to the current blueprint to parse it.

@distantnative @lukasbestle I mean to get this: files: false. Something like:

if( $page->hasUploadPermission() ) { echo 'Do whatever'; }

Yea, no that’s not possible. As @lukasbestle has pointed out, blueprints are something only the panel knows about, the core doesn’t work with them, so you would need to parse them yourself.

@distantnative @lukasbestle

Ok! Thank you both for your help.