currently we use node-sanitize-filename to create sanitized names and save them to a folder. The problem with this approach, is that names are not unique. We could be overriding files when writing. I had thought this was fine since urls should be unique to files, but what about different headers/body/query params? Instead were just going to use database download ids when saving files. The downside is that the data becomes less readable on its own, but thats ok, we still have downloadData attached to a download in the database.
currently we use
node-sanitize-filename
to create sanitized names and save them to a folder. The problem with this approach, is that names are not unique. We could be overriding files when writing. I had thought this was fine since urls should be unique to files, but what about different headers/body/query params? Instead were just going to use database download ids when saving files. The downside is that the data becomes less readable on its own, but thats ok, we still have downloadData attached to a download in the database.