Learn R Programming

AutoDeskR (version 0.1.5)

uploadFile: Upload a File to an App-Managed Bucket.

Description

Upload a design file to an app-managed bucket using the Data Management API.

Usage

uploadFile(file = NULL, token = NULL, bucket = "mybucket")

Value

An object containing the bucketKey, objectId (i.e. urn), objectKey (i.e. file name), size, contentType

(i.e. "application/octet-stream"), location. and other content information.

Arguments

file

A string. File path.

token

A string. Token generated with getToken function with bucket:create, bucket:read, and data:write scopes.

bucket

A string. Unique bucket name. Defaults to mybucket.

Examples

Run this code
if (FALSE) {
# Upload the "aerial.dwg" file to "mybucket"
resp <- uploadFile(file = system.file("inst/samples/aerial.dwg", package = "AutoDeskR"),
           token = myToken, bucket = "mybucket")
myUrn <- resp$content$objectId
}

Run the code above in your browser using DataLab