def _safe_filename(filename):
    filename = secure_filename(filename)
    date = datetime.datetime.utcnow().strftime("%Y-%m-%d-%H%M%S")
    basename, extension = filename.rsplit('.', 1)
    return "{0}-{1}.{2}".format(basename, date, extension)


# [START upload_file]
Generates a safe filename that is unlikely to collide with existing objects
dataset/ETHPy150Open GoogleCloudPlatform/getting-started-python/3-binary-data/bookshelf/storage.py/_safe_filename