def read_form_data(request):
    """
    Returns the request's form data as a dictionary, both in `request.form`
    and `request.files`. Importantly, it also ensures through the file_keys
    list that form data expected to be sent as a file, does not appear as
    a form key-value pair.
    """

    data = {}
    if request.json:
        data.update(request.json)
    if request.form.to_dict():
        data.update(request.form.to_dict())

    data.update(request.files.to_dict())
    if bool(data):
        return data

    return None