def getRequestsFileName(request):
    """Get the filename from a Requests context"""
    content_disposition = request.headers.get("Content-Disposition")
    if content_disposition is not None:
        attributes = (x.strip() for x in content_disposition.split(";")
                      if x.startswith("filename="))
        for attr in attributes:
            _, filename = attr.split("=")
            return filename.strip('"')
    return None