gcs_add: Helper for 'upload_assets()': Add a file to Google Cloud...

gcs_addR Documentation

Helper for upload_assets(): Add a file to Google Cloud Storage bucket

Description

A shallow wrapper for googleCloudStorageR::gcs_upload() with GP error checking. Will validate:

  • file(s) exist

Usage

gcs_add(assets, bucket = "gp-cloud", key = NULL)

Arguments

assets

expects a tibble with local path(s) to a file. Must have columns:

  • path: local file path

  • cloud_path: the relative hierarchy for cloud file, e.g. "/Project_en-US/whatever.jpeg"

bucket

GCS bucket; default= "gp-cloud"

key

name of the galacticPubs key to add to Google Cloud meta data. Passed to googleCloudStorageR::gcs_metadata_object(); default=NULL. *Right now it will go to the web, but there doesn't seem to be a way to access it in R.

Value

boolean of success

See Also

Other google cloud storage: gcs_contents(), gcs_delete(), upload_assets()


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.