Databrary stores file types (assets) of many types. This function downloads an asset based on its system-unique integer identifer (asset_id) and system-unique session (slot) identifier (session_id).
Arguments
- asset_id
An integer. Asset id for target file. Default is 1.
- session_id
An integer. Slot/session number where target file is stored. Default is 9807.
- file_name
A character string. Name for downloaded file. Default is NULL.
- target_dir
A character string. Directory to save the downloaded file. Default is a temporary directory given by a call to
tempdir()
.- timeout_secs
An integer constant. The default value, defined in CONSTANTS.R is REQUEST_TIMEOUT. This value determines the default timeout value for the httr2 request object. When downloading large files, it can be useful to set this value to a large number.
- vb
Show verbose messages. (Defaults to
FALSE
, overwritable using option 'databraryr.vb' or environment variable 'R_DATABRARYR_VB')- rq
A list in the form of an
httr2
request object. Default is NULL.