kirby-upload-extended
kirby-upload-extended copied to clipboard
throws error when uploading in site
hi there,
the plugin is throwing an error when i have set an excludedTemplate in the config. this is only happening in $site though! in all other pages the error is not shown.
i think the plugin checks for the page's template, but since site does not have one, it comes to an error
PS: the excluded templates are referring to file templates or page templates? it is not clearly documented
Hi @squareclouds, the excluded templates are referring to page templates.
ok, thank you, i was using it wrong then. but again, as soon as a template is set in the config to explude, the site throws an error, because the code looks for the intendedTemplate() and i think site does not have that function
do i see correctly that you also can not exclude certain file types. just wanted to upload a svg and did not work because tinypng does not support svg. any idea?
This should not happen. Before TinyPNG is addressed, there is a query whether it is possible to enlarge or reduce the file. At most Kirby sees SVG files also as resizable but I can't imagine that.
<?php if ( $file->isResizable() ) : ?> ... <?php endif; ?>
know the reason now. interestingly, the method you mentioned stupidly returns 'jpg' for the SVG.
<?php die($this->extension()); ?>
That is strange. I just asked on Discord if anyone has a solution for that or if this is "by design"
@gesundheitundpersonal have now also looked at the whole thing again and asked in the forum. Something is wrong with your file. With me SVGs are not reduced. But if your SVG outputs the extension JPG the error is quite clear.
@gesundheitundpersonal have now also looked at the whole thing again and asked in the forum. Something is wrong with your file. With me SVGs are not reduced. But if your SVG outputs the extension JPG the error is quite clear.
sorry did i miss something? @gesundheitundpersonal was not the OP, it was me, and his problem had nothing to do with my issue, why has this been closed?
Sorry, my fault. It's open again
no harm done ^^