View source: R/upload_survey_media.R
upload_survey_media | R Documentation |
Upload a tibble of SurveyMediaAttachments to WAStD
upload_survey_media( x, api_url = wastdr::get_wastdr_api_url(), api_token = wastdr::get_wastdr_api_token(), verbose = wastdr::get_wastdr_verbose(), upload = Sys.getenv("ODKC_IMPORT_UPLOAD_MEDIA", unset = TRUE) )
x |
A tibble of SurveyMediaAttachments, e.g. the output of
|
api_url |
(character) The WAStD API URL,
default |
api_token |
(character) The WAStD API token,
default |
verbose |
Whether to show debug messages. Default: wastdr::get_wastdr_verbose() |
upload |
Whether to upload media files.
Default: |
api_un |
(character) A WAStD API username,
default |
api_pw |
(character) A WAStD API password,
default |
WAStD's SurveyMediaAttachment endpoint uses a plain ModelViewSet and cannot handle multiple uploads. This function therefore uploads records individually. If a file does not exist locally, the record is skipped and a warning is emitted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.