Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CulturalMe/meteor-slingshot into …
Browse files Browse the repository at this point in the history
…fix-download-path-84

Conflicts:
	CHANGELOG.md
  • Loading branch information
gsuess committed Mar 29, 2015
2 parents 754c84d + d9af24f commit 1f68368
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ Slingshot Changelog

## Version 0.6.1

* Fixed bad S3 download url generation where the download url would start with `https:/` instead of `https://`. ([#84](https://github.com/CulturalMe/meteor-slingshot/issues/84))
### Enhancements

* Added a way to get the server response to the uploader. ([#82](https://github.com/CulturalMe/meteor-slingshot/issues/82))

### Bug Fixes

* Fixed bad S3 download url generation where the download url would start with `https:/` instead of `https://`. ([#84](https://github.com/CulturalMe/meteor-slingshot/issues/84))

## Version 0.6.0

Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
meteor-slingshot
meteor-slingshot
================

[![](https://api.travis-ci.org/CulturalMe/meteor-slingshot.svg)](https://travis-ci.org/CulturalMe/meteor-slingshot) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CulturalMe/meteor-slingshot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand Down Expand Up @@ -38,7 +38,14 @@ On the client side we can now upload files through to the bucket:
var uploader = new Slingshot.Upload("myFileUploads");

uploader.send(document.getElementById('input').files[0], function (error, downloadUrl) {
Meteor.users.update(Meteor.userId(), {$push: {"profile.files": downloadUrl}});
if (error) {
// Log service detailed response
console.error('Error uploading', uploader.xhr.response);
alert (error);
}
else {
Meteor.users.update(Meteor.userId(), {$push: {"profile.files": downloadUrl}});
}
});
```

Expand Down
1 change: 1 addition & 0 deletions lib/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ Slingshot.Upload = function (directive, metaData) {
});

xhr.send(buildFormData());
self.xhr = xhr;

return self;
},
Expand Down

0 comments on commit 1f68368

Please sign in to comment.