From cafdaac4021abfe6d87b95d5428967ea1f81f0e9 Mon Sep 17 00:00:00 2001 From: Hans Kristian Flaatten Date: Wed, 29 Jul 2015 09:26:03 +0200 Subject: [PATCH] Clean up upload example in README.md --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 48704ce..84f2090 100644 --- a/README.md +++ b/README.md @@ -147,14 +147,13 @@ var client = new Upload('my_s3_bucket', { #### Example ```javascript -client.upload('/some/file/path.jpg', {}, function(err, images, meta) { - if (err) { - console.error(err); - } else { - for (var i = 0; i < images.length; i++) { - console.log('Thumbnail with width %i, height %i, at %s', images[i].width, images[i].height, images[i].url); - } - } +client.upload('/some/image.jpg', {}, function(err, versions, meta) { + if (err) { throw err; } + + versions.forEach(function(image) { + console.log(image.width, image.height, image.url); + // 1234 4567 https://my-bucket.s3.amazonaws.com/path/ab/cd/ef.jpg + }); }); ```