upload_file_to_site: Upload a local file to a Google Sites

Description Usage Arguments Value Source Examples

View source: R/wrappers.R

Description

This function uploads a local file (png, pdf, or other media) via API

Usage

1
2
3
upload_file_to_site(local_file_path, file_summary = "", parent_page_id = "",
  overwrite = TRUE, site_domain = getOption("googlesites.site_domain"),
  site_name = getOption("googlesites.site_name"))

Arguments

local_file_path

A string representing a local file path where the target file exists to be uploaded

file_summary

A string an (optional) description of the attachment when created

parent_page_id

A string representing the absolute URL that identifies the entry id of a webpage where the uploaded file will be attached. This should be an absolute URL looking like: https://sites.google.com/feeds/content/mydomain/mysite/6477233125232797597. You can find this URL by using the find_content function.

overwrite

A logical value. TRUE means that the function will identify and overwrite any Google Site attachments that exists with the same name (case-insensitive). FALSE means fail whenever a conflicting attachment name exists on the site

site_domain

A string representing 'site' or the domain of your Google Apps hosted domain (e.g. example.com)

site_name

A string representing the webspace name of your site; found in the Site's URL (e.g. myCoolSite)

Value

A list of length two consisting of a URL for the created attachment and the Google Sites Entry ID

Source

utils.R

Examples

1
2
3
4
## Not run: 
file <- upload_file_to_site(local_file_path='./files/test.png')

## End(Not run)

ReportMort/googlesites documentation built on May 6, 2019, 10:12 a.m.