imguR (version 1.0.3)

upload_image: Upload an image file to Imgur

Description

Uploads a named image file to Imgur, optionally to a specified album.

Usage

upload_image(file, title = NULL, description = NULL, album = NULL, name = NULL, type = 'file', ...) imgur_upload(file, title = NULL, description = NULL, album = NULL, name = NULL, type = 'file', ...)

Arguments

file
Name of the file to be uploaded to imgur.com
title
Optionally, an image title.
description
Optionally, an image description.
album
Optionally, an Imgur album ID.
name
Optionally, a file name, otherwise the file filename is used.
type
Should be “file”.
...
Other arguments passed to HTTP request functions, for example: token (an OAuth2.0 token) or key (an API key, used by default).

Value

Details

upload_image allows users to upload a named file to Imgur. imgur_upload is an alias that can serve as a drop-in replacement for the imgur_upload function in the knitr package.

References

https://api.imgur.com/endpoints/image#image-upload

See Also

imguR dev.off

Examples

Run this code
## Not run: 
# pdf(tmpfile <- tempfile())
# hist(rnorm(20))
# dev.off()
# upload_image(tmpfile)
# ## End(Not run)

Run the code above in your browser using DataLab