raimon said about 6 years ago on In-depth Look into ActiveStorage :

Hi Dave,


Excellent post. I just have two questions regarding ActiveStorage:

- How can we manipulate (add prefixes, for example) the filename that has to be uploaded?

- How would you approach an scenario where you need to mark the attachments? I amb thinking, for example, in the case where you want to set some images as banned. As we cannot manipulate ActiveStorage tables, it looks very tricky to imagine a solution. maybe a proxy table? with your example, it would be something like "users" -> "files" -> "attachments". So you can always query for the "files" filtered and get the proper "attachments".


Thanks for the tutorial!