ns_get_attachment {nettskjemar} | R Documentation |
Save Nettskjema attachments to file
Description
The Nettskjema forms has an option
to upload attachments with forms.
These can be retrieved by this function.
Recommended workflow is to first call
ns_list_submission_attachments
,
and use the output of this to pass along
to the function. This function is called
by ns_get_form_attachments
,
but you can use it to define your own output
file names.
Usage
ns_get_attachment(attachment_id, path = NULL)
Arguments
attachment_id |
integer. Unique ID of attachment, as found in the submission data. |
path |
Character. Location to save the file. |
Value
httr2-response. saves attachment to file.
Examples
## Not run:
#submission_id <- c(22222, 1232, 21555)
#attach_dt <- ns_list_submission_attachments(submission_id)
#ns_save_attachment(path = attach_dt$path, output = attach_dt$standardized)
## End(Not run)
[Package nettskjemar version 1.0.2 Index]