def METHOD_NAME(cls, context, filename, resource_name, dataset_name):
    file_path = os.path.join(os.path.dirname(__file__), filename)
    with open(file_path) as f:
        file_upload = FileStorage(f)
        resource_dict = _get_action('resource_create')(context,
                                                       {
                                                           'package_id': dataset_name,
                                                           'name': resource_name,
                                                           'url_type': 'upload',
                                                           'resource_type': 'file.upload',
                                                           'upload': file_upload
                                                       }
                                                       )
    return resource_dict