Skip to content

Commit

Permalink
Clean up upload example in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Jul 29, 2015
1 parent 53cf7a0 commit cafdaac
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
});
```

Expand Down

0 comments on commit cafdaac

Please sign in to comment.