Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling and file_name #50

Closed
wants to merge 10 commits into from

Conversation

ludekdolejsky
Copy link

Fix for #49
and fix for #48

I have noticed that the `S3.upload()` method returns success (`percent_uploaded` = 100, `url`, etc.) even when the Amazon S3 does not return HTTP 200 (OK) - for example due to misconfiguration (missing `S3.config.region`, in my case).

In addition to this, I believe the error-handling logic in `Meteor.methods._S3upload` is faulty, mainly to the fact, that if you throw `new Meteor.Error` inside the `S3.knox.putStream (ClientRequest)` context, it brings down the whole application (unhandled exception). Throwing error from `_S3upload` context is fine and results in `err` being propagated back to the client via callback.
Would be great to add `file_name` into the document returned from `S3.collection`
It makes the identification of progress much easier
@ludekdolejsky
Copy link
Author

committed more than I wanted by mistake :)

@ludekdolejsky ludekdolejsky reopened this Nov 28, 2014
@Lepozepo
Copy link
Owner

Excellent, I've folded these changes into the development branch. Hope to release a couple of changes over the weekend.

@Lepozepo Lepozepo closed this Nov 28, 2014
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.

2 participants