I wrote a "microservice" on top of S3 (tested with Minio too) and PostgreSQL that does this, among other things (e.g. image transformations, TUS uploads, web page screenshots). I would consider open sourcing it if there's enough interest.
second, deduplication feature is great, for minio and S3 usuage. if the users decided to attach same file to multiple comments (in my case) deduplication would save me a lot.