attach_file_to_node {dkanr} | R Documentation |
attach_file_to_node
Description
Attach a file to an existing resource node
Usage
attach_file_to_node(nid, url = get_url(), credentials = list(cookie =
dkanr::get_cookie(), token = dkanr::get_token()), file_path,
attach = 1)
Arguments
nid |
character: DKAN resource node ID |
url |
character: The DKAN site URL |
credentials |
Optional list parameter. Default values are Cookie and Token generated by dkan_setup() |
file_path |
character: path to file on local machine |
attach |
numeric: Setting the attach parameter to 0 ensures that the file will replace any existing file on the resource. Setting it to 1 will result in a rejected request if the resource already has an attached file (but it will work if the resource file upload field is empty). |
[Package dkanr version 0.1.3 Index]