AmericanRedCross / disaster-asset-manager

node app to make building the mapfolio a lot easier
0 stars 1 forks source link

auto file naming #4

Closed danbjoseph closed 9 years ago

danbjoseph commented 9 years ago

maybe build in automatic file naming based on the data submitted through fields in the new asset form?

kevinlustig commented 9 years ago

The file name is currently preserved from the file that was uploaded (upload foo.pdf and you get foo.pdf when you download the file via the API at "/api/asset/{asset_id}/file". What kind of automatic naming would you like to see?

danbjoseph commented 9 years ago

was talking with an IFRC guy and if a platform like this was used in a disaster and used by relief teams to upload situation reports, etc then it would be nice to standardize the file naming instead of relying on the field people doing the uploading. e.g. maybe making sure all health unit situation reports note it as such and include the date.

for series of maps (e.g. weekly produced distribution maps, could add "v{{number}}" somewhere in the file name

etc.

lower priority but something to think about

kevinlustig commented 9 years ago

Added basic automatic file naming. Formula is:

[type (e.g., map, sitrep, etc.)]-[timestamp]-[original filename to lowercase with punctuation replaced by "-"].[original extension]

We can obviously adjust this to whatever you'd like.

When we have file versioning, can adjust this then, as well.