Returns the "webViewLink" for one or more files, which is the "link for opening the file in a relevant Google editor or viewer in a browser".

drive_link(file)

Arguments

file

Something that identifies the file(s) of interest on your Google Drive. Can be a character vector of names/paths, a character vector of file ids or URLs marked with as_id(), or a dribble.

Value

Character vector of file hyperlinks.

Examples

# get a few files into a dribble
three_files <- drive_find(n_max = 3)

# get their browser links
drive_link(three_files)
#> [1] "https://drive.google.com/file/d/1p3iRRgXUC51WuGeE3nhNJiNi_1PERd_u/view?usp=drivesdk"
#> [2] "https://drive.google.com/file/d/1dandXB0QZpjeGQq_56wTXKNwaqgsOa9D/view?usp=drivesdk"
#> [3] "https://drive.google.com/file/d/1XfCI_orH4oNUZh06C4w6vXtno-BT_zmZ/view?usp=drivesdk"