Learn R Programming

rfigshare (version 0.3.7)

fs_upload: Upload file to an article

Description

Upload file to an article

Usage

fs_upload(article_id, file, session = fs_get_auth())

Arguments

article_id

an article id number or a character string (or list) of numbers

file

path to file to upload, or character string (or list) of files (paths)

session

the authentication credentials from fs_auth (optional)

Details

Article must be a draft, i.e. created by fs_create and not yet made public or private. Only articles of type "fileset" can have multiple files uploaded.

References

http://api.figshare.com

See Also

fs_auth

Examples

Run this code
# NOT RUN {
id <- fs_create("Title", "description", "figure")
fs_upload(id, "file.png")
# }

Run the code above in your browser using DataLab