attachment_url: Build the download URL for one or many submission UUIDs and...

attachment_urlR Documentation

Build the download URL for one or many submission UUIDs and filenames.

Description

[Stable]

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 through ru_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 through ru_setup(fid="...").

See vignette("Setup", package = "ruODK").

url

The ODK Central base URL without trailing slash.

Default: get_default_url.

Set default url through ru_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.

Value

The inferred download URL.

See Also

Other utilities: attachment_get(), attachment_link(), drop_null_coords(), form_schema_parse(), get_one_attachment(), get_one_submission(), get_one_submission_attachment_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"
)

dbca-wa/ruODK documentation built on March 20, 2024, 12:19 p.m.