| scto_get_attachments {rsurveycto} | R Documentation |
Fetch file attachments from a SurveyCTO server
Description
This function can download encrypted and unencrypted files attached to forms.
Usage
scto_get_attachments(
auth,
urls,
output_dir,
private_key = NULL,
overwrite = TRUE
)
Arguments
auth |
|
urls |
Character vector of API URLs for file attachments. Will typically
be derived from a column of a |
output_dir |
String indicating path to directory in which to save files. |
private_key |
String indicating path to private key file. Only needs to
be non- |
overwrite |
Logical indicating whether to overwrite existing files. |
Value
A character vector of file names of the same length as urls, with
NA for missing or invalid URLs.
See Also
scto_auth(), scto_read(), scto_get_form_definitions(),
scto_write()
Examples
## Not run:
auth = scto_auth('scto_auth.txt')
scto_data = scto_read(auth, 'my_form', 'form')
filenames = scto_get_attachments(auth, scto_data[['my_attachment']])
## End(Not run)
[Package rsurveycto version 0.1.6 Index]