Build the download URL for one or many submission UUIDs and filenames.
Source:R/attachment_get.R
attachment_url.Rd
Usage
attachment_url(
uuid,
fn,
pid = get_default_pid(),
fid = get_default_fid(),
url = get_default_url()
)
Arguments
- uuid
The UUID of one form submission, or a vector of UUIDs.
- fn
The attachment filename, as per ODK form submission, or a vector of attachment filenames.
- pid
The numeric ID of the project, e.g.: 2.
Default:
get_default_pid
.Set default
pid
throughru_setup(pid="...")
.See
vignette("Setup", package = "ruODK")
.- fid
The alphanumeric form ID, e.g. "build_Spotlighting-0-8_1559885147".
Default:
get_default_fid
.Set default
fid
throughru_setup(fid="...")
.See
vignette("Setup", package = "ruODK")
.- url
The ODK Central base URL without trailing slash.
Default:
get_default_url
.Set default
url
throughru_setup(url="...")
.See
vignette("Setup", package = "ruODK")
.
Details
This is a helper function used by attachment_get
.
This function is vectorised and accepts single values or vectors for uuid and
fn.
See also
Other utilities:
attachment_get()
,
attachment_link()
,
drop_null_coords()
,
form_schema_parse()
,
get_one_attachment()
,
get_one_submission()
,
get_one_submission_att_list()
,
get_one_submission_audit()
,
handle_ru_attachments()
,
handle_ru_datetimes()
,
handle_ru_geopoints()
,
handle_ru_geoshapes()
,
handle_ru_geotraces()
,
isodt_to_local()
,
odata_submission_rectangle()
,
predict_ruodk_name()
,
prepend_uuid()
,
split_geopoint()
,
split_geoshape()
,
split_geotrace()
,
strip_uuid()
,
tidyeval
,
unnest_all()
Examples
# See vignette("setup") for setup and authentication options
# ruODK::ru_setup(svc = "....svc", un = "me@email.com", pw = "...")
ruODK:::attachment_url(
"uuid:d3bcefea",
"filename.jpg",
pid = 1,
fid = "form1",
url = "https://my.odkcentral.org"
)
#> https://my.odkcentral.org/v1/projects/1/forms/form1/submissions/uuid:d3bcefea/attachments/filename.jpg