Skip to content

Conversation

@patrick-miller
Copy link
Contributor

@patrick-miller patrick-miller commented Feb 26, 2018

The file argument tmp is created by tempfile() so rawConnectionValue does not work on it. This matches up with the rest of the S3 access functions, such as

r <- do.call("save_object", c(list(bucket = bucket, object = object, file = tmp), opts))

on line 63 of the same file.

Here is an example (pardon the non-standard approach to access/secret key management):

MYKEY <- Sys.getenv("AWS_ACCESS_KEY_ID")
MYSECRET <- Sys.getenv("AWS_SECRET_ACCESS_KEY")

bucket <- get_bucket("mybucket")  

s3write_using(x = iris, write.csv, object = "iris.csv",
  bucket = bucket, opts = list(key = MYKEY, secret = MYSECRET))

# This works
s3write_using(x = iris, write.csv, object = "iris.csv", bucket = bucket)

The file argument tmp is created by tempfile() so rawConnectionValue
does not work on it. This matches up with the rest of the functions.
@patrick-miller patrick-miller mentioned this pull request Feb 26, 2018
@codecov-io
Copy link

codecov-io commented Feb 26, 2018

Codecov Report

Merging #205 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #205   +/-   ##
=======================================
  Coverage   20.94%   20.94%           
=======================================
  Files          32       32           
  Lines        1117     1117           
=======================================
  Hits          234      234           
  Misses        883      883
Impacted Files Coverage Δ
R/s3read_using.R 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b9f47b...8e825e2. Read the comment docs.

@leeper leeper merged commit 8e825e2 into cloudyr:master Mar 19, 2018
@patrick-miller patrick-miller deleted the fix-s3_writeusing branch March 19, 2018 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants