Hi, I’m trying to adapt this hook from Kirby 2 that renames files on upload.
I adapted it a bit, and it’s kind of working, the problem is that when I upload several files in a files section, only the first one is renamed.
In Kirby 2, the hook was renaming correctly every files, even if I uploaded multiple files at once.
What am I missing from what has changed with hooks in Kirby 3 ?
What filesize and how many images are we talking here?
I just tested this and several files were renamed, others were not, depending on the number of images it seems. Haven’t debugged this properly yet, but I wonder if this has to do with PHP settings.
Similarly, I have a plugin that runs images through the TinyPNG compressor on file.create and it works fine for the first upload but if the user drops multiple images into the files section, it only works on the first one and clogs up before doing the rest.