def save_uploaded_file(f, filename):
    """
    Helper function to save the transmitting csv file
    from the client
    """
    with open(filename, 'wb+') as destination:
        for chunk in f.chunks():
            destination.write(chunk)

    return filename