AssetMapper and File Upload

25 Views Asked by At

with Symfony 7, I'm using AssetMapper. So my image files are located in assets/images.

In production, I build them with a little php bin/console asset-map:compile and life is beautiful.

But what should I do when my admin uploads a file via the back office in production?

Today, I run the command php bin/console asset-map:compile via the controller that manages the file upload so that, with each image upload, the assets are built.

But is this the right practice? Is there a different way to do it and if so, have you found it?

Thanks in advance :)

0

There are 0 best solutions below