Skip to content

S3Adapter: expose the object and use => for s3.upload callback #156

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

Merged
merged 1 commit into from
Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion S3Adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ S3Adapter.prototype.create = function(config, filename, data) {
}

return new Promise((resolve, reject) => {
this.s3.upload(params, function(err, data) {
this.s3.upload(params, (err, data) => {
if (err !== null) return reject(err);
resolve(data);
});
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var batch = require('./batch'),
DatabaseAdapter = require('./DatabaseAdapter'),
express = require('express'),
FilesAdapter = require('./FilesAdapter'),
S3Adapter = require('./S3Adapter'),
middlewares = require('./middlewares'),
multer = require('multer'),
Parse = require('parse/node').Parse,
Expand Down Expand Up @@ -179,5 +180,6 @@ function getClassName(parseClass) {
}

module.exports = {
ParseServer: ParseServer
ParseServer: ParseServer,
S3Adapter: S3Adapter
};