This function can be used to update an existing CKAN file resource with a compiled Rmd workbook (i.e a HTML file).

upload_file_to_ckan(rid, fn, verbose = get_tsc_verbose())

Arguments

rid

An existing CKAN resource ID.

fn

The file to upload as the CKAN file resource.

verbose

Whether to show verbose messages. Default: get_tsc_verbose.

Value

NULL if the file is missing, or the resource ID.

Details

This function is a wrapper around ckanr::resource_update() with contingencies for missing files.

See also

Other ckan: ckan_works(), dl_mdbzip(), upload_to_ckan()

Examples

if (FALSE) {
ckanr::ckanr_setup(
  url = Sys.getenv("CKAN_URL"), key = Sys.getenv("CKAN_API_KEY")
)
upload_file_to_ckan("1b5e6401-82fe-4728-83be-f3f8ea4b5876", "EDA_flora.html")
}