Skip to content

Commit

Permalink
Merge pull request #156 from skinp/patp.expose-s3
Browse files Browse the repository at this point in the history
S3Adapter: expose the object and use => for s3.upload callback
  • Loading branch information
gfosco committed Feb 2, 2016
2 parents e9f8263 + e3c5ea9 commit 3978e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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
};

0 comments on commit 3978e41

Please sign in to comment.