from datetime import datetime


def generate_upload_file_path(form_fields):
    """
    Use validated form fields to create the key for S3
    """
    now = datetime.now().strftime("%Y%m%d-%H%M%S")
    file_path_to_upload = "{}/{}_{}.{}".format(
        form_fields["file_location"],
        now,
        form_fields["file_name"],
        form_fields["file_ext"],
    )
    return file_path_to_upload