From 1fda8e8746d08a9412e614c66e25994b478fc973 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Tue, 20 Dec 2016 10:28:11 +0100 Subject: [PATCH] fix sample in README aws config has to be loaded before creating S3-instance --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f494a1..4de1f16 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,12 @@ Removing global state, and adding pause and resume functionality. var AWS = require('aws-sdk'), zlib = require('zlib'), fs = require('fs'); - s3Stream = require('s3-upload-stream')(new AWS.S3()), // Set the client to be used for the upload. AWS.config.loadFromPath('./config.json'); +var s3Stream = require('s3-upload-stream')(new AWS.S3()); + // Create the streams var read = fs.createReadStream('/path/to/a/file'); var compress = zlib.createGzip();