uploadFile: Upload File

Description Usage Arguments See Also Examples

View source: R/tempStorageMethods.R

Description

Uploads a file to the temporary sauce storage. The storage will only retain the files for seven days.

Usage

1
2
uploadFile(account, username = Sys.getenv("SLUSER"), file,
  SLfileName = basename(file), ...)

Arguments

account

An object of class "account". An account object see account.

username

SauceLabs username

file

file to upload

SLfileName

name to give the file on SauceLabs. (Defaults to the current name of the file)

...

Additonal function arguments - Currently unused.

See Also

Other tempStorageMethods: getStoredFiles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 
myAcc <- account()
# create a temporary file
myTempFile <- file.path(tempdir(), "notsecret.html")
write("SUPER SECRET STUFF", myTempFile)
# check stored files
myStoredFiles <- getStoredFiles(myAcc)

# upload new file
res <- uploadFile(myAcc, file = myTempFile)
#> res
#$username
#[1] "seleniumPipes"
#
#$size
#[1] 19
#
#$md5
#[1] "e459fe3803b78d64cc5c2998804909a9"
#
#$filename
#[1] "notsecret.html"

#> digest::digest(file = myTempFile, algo = "md5")
#[1] "e459fe3803b78d64cc5c2998804909a9"

myStoredFiles <- getStoredFiles(myAcc)

#> rbindlist(myStoredFiles$files)
#size      mtime           name                              md5
#1:   19 1472401537 notsecret.html e459fe3803b78d64cc5c2998804909a9
#2:   14 1472350499      testDoc.R adfc8afc373f0b3fd6f93c3891bdd11b


## End(Not run)

RSauceLabs documentation built on May 29, 2017, 3:24 p.m.