We have always planned to rename uploaded files in the following format: {file_version_id}.{extension}. In our original database design, we intended to save this filename in the database. But I realised that by including the file version id we are creating redundant data by storing the primary key twice. So I decided to only store the file extension. We will work out file names on the fly when we need them, by joining the file version id with the extension.
No comments:
Post a Comment