FriendsOfCake / cakephp-upload

CakePHP: Handle file uploading sans ridiculous automagic
https://cakephp-upload.readthedocs.io/
MIT License
551 stars 255 forks source link

Fixing case when an invokeable object is used as a callback #547

Closed burzum closed 3 years ago

burzum commented 3 years ago

Obviously nobody else had yet the desire to move the sometimes pretty long callbacks into proper objects. Well, we did and figured out the plugin doesn't like it. 😃 This fixes the problem.

ADmad commented 3 years ago

Obviously nobody else had yet the desire to move the sometimes pretty long callbacks into proper objects

The path processor is configurable, so for such cases you can use a custom path process class and override it's filename() method. It would be the same effort and making your own invokable class.

ADmad commented 3 years ago

You should be able to use invokable class instance as callback without issues with the 5.0.0-RC2 release.