FriendsOfCake / cakephp-upload

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

Thumbnail generations and shell #526

Closed tgoeminne closed 2 years ago

tgoeminne commented 4 years ago

Hi,

I have a question,. If I understand correctly the thumbnail generation is removed and have to use the transformer now as per example?

When making the changes and adding the transformer, how would you mass generate the thumbnails for previously added files easily?

Greets, Thomas

davidyell commented 4 years ago

In this instance I wrote a shell command to parse the file system, instantiate an instance of the transformer, do the thumbnails and save them back to the file system.

tgoeminne commented 4 years ago

Can you share the shell script?

davidyell commented 4 years ago

Sure, it's written for a different plugin though. https://github.com/davidyell/CakePHP3-Proffer/blob/master/src/Shell/ProfferShell.php