Upload File to Cloud Storage
upload_cloud_file.Rd
Uploads a local file to a specified cloud storage bucket, supporting both single and multiple files.
Arguments
- file
A character vector specifying the path(s) of the file(s) to upload.
- provider
A character string specifying the cloud provider ("gcs" or "aws").
- options
A named list of provider-specific options including the bucket and authentication details.
- name
(Optional) The name to assign to the file in the cloud. If not specified, the local file name is used.
Details
For GCS, the options list must include:
bucket
: The name of the bucket to which files are uploaded.service_account_key
: The authentication JSON contents, if not previously authenticated.
This function utilizes googleCloudStorageR::gcs_upload()
for file uploads to GCS.