store files per entity , like for one user there could be bunch of documents and each document type has to have a type/tag assigned to it. ATM i am relying on s3 object path, like users/123/files/...
and when i am tagging, I am putting tag enum name in the path as well, I am thinking this is not good idea as it requires renaming file when file tag is changed and s3 naming restrictions etc .. What is the industry level solution for this. Does storing the file key in database and file in s3 and using that database single source of truth is good idea?
The usual way is using an extension of the filename as indicator of the type.
Storing the mimetype in the database is also possible.
Стикер
Обсуждают сегодня