Hi. How can I set up unique file name generation in cloud storage plugin before uploading to S3? Currently files just uploaded with original names and this is not playing well with CDN caching. This is possible without needed to write own version of cloud storage plugin?
You can define a
beforeOperation
hook on your Media collection , this way you can set the filename before its even processed and uploaded
Here's a sample of a random filename generator you can use as a base
@edwardbc. Thanks!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.