

def _get_upload_name(self, filename):
    'Returns an upload_to path to a new file'
    import hashlib
    import random
    while True:
        hasher = hashlib.md5()
        hasher.update(str(random.random()))
        filepath = ((('identities/' + hasher.hexdigest()) + '__') + filename)
        fullpath = (settings.MEDIA_ROOT + filepath)
        if (not default_storage.exists(fullpath)):
            return filepath

dataset/ETHPy150Open treeio/treeio/treeio/identities/forms.py ContactForm._get_upload_name/original