Hi @Xiphware,
Thanks for following up. I can think of multiple reasons why this would be useful to customize file names (images), e.g.:
- custom names would allow working with images directly in the file system, without referring to survey data (e.g. sorting or filtering by name, which may include project name, category, surveyor’s name etc)
- external requirements (e.g. imposed by clients on how images should be named or by external apps / systems - e.g. file names should not start with a digit, or there might be a file name length limit)
- aligning with naming conventions used by other systems / applications
what if, as an API client app, I state "store this file as ‘…/…/etc/passwd’.
Not sure what you mean here? Do you mean that client would customize a path for storing the image? I think only file name itself could be customizable. Special characters (such as “/” etc) could not be permitted (to ensure safe file names).
think about uploading images for the same form from different devices that may well have current overlapping “IMGXXXX.jpg” namespaces.
Is there any limitation from ODK/KoBo side if file names are duplicated? Also, even using System.currentTimeMillis() does not ensure global uniqueness.
As far as I can see, when downloading media attachments, they are stored in separate folders for each form/project and each submission. So custom file names should be unique for each submission (two file names in the same folder are not allowed). - I’m sure this could be easily worked around, the same way as Windows is copying/pasting files with the same name (e.g. adding "_Copy1"
etc…