This file uploader is largely borrowed from the R package NPSdatastore. It will take a file of any size and upload it to a given reference. This involves chunking the file into smaller pieces in order to upload larger files.

upload_files(
  filename,
  path,
  reference_id,
  is_508 = FALSE,
  chunk_size_mb = 1,
  retry = 1,
  dev = TRUE
)

Arguments

filename

String. Name of the file to be uploaded.

path

String. Location of the file to be uploaded.

reference_id

String. The reference number for the DataStore reference the file will be uploaded to.

is_508

Logical. Is the file in question 508 compliant? TRUE = Yes, FALSE = No. Defaults to FALSE.

chunk_size_mb

Integer. Size of file chunks to be uploaded, in MB

retry

Integer. Number of times to retry uploading file chunks if a given chunk fails.

dev

Logical. Defaults to TRUE. FALSE means files will be uploaded to the production server. TRUE means files will be uploaded to the development server. Use Dev = TRUE when testing the function.

Value

List. Of information about the uploaded file.

Examples

if (FALSE) upload_files(filename = "example_file.wav",
                                 path = getwd(),
                                 reference_id = 1234567,
                                 is508 = FALSE,
                                 dev = TRUE) # \dontrun{}