mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
chore: Update pageres
Removes dependency on memoize-async, which was unpublished: https://medium.com/@azerbike/i-ve-just-liberated-my-modules-9045c06be67c#.tlcdr5ieg
This commit is contained in:
parent
fd10422e0c
commit
ef2a1f5929
2 changed files with 4 additions and 5 deletions
|
|
@ -60,7 +60,7 @@
|
|||
"newrelic": "~1.25.0",
|
||||
"nib": "~1.0.1",
|
||||
"nodemailer": "~0.5.2",
|
||||
"pageres": "^1.0.1",
|
||||
"pageres": "^4.1.1",
|
||||
"passport": "~0.2.1",
|
||||
"passport-facebook": "2.0.0",
|
||||
"paypal-ipn": "2.1.0",
|
||||
|
|
|
|||
|
|
@ -115,9 +115,8 @@ dataexport.avatarImage = function(req, res, next) {
|
|||
return res.redirect(301, 'https://' + bucket + '.s3.amazonaws.com/' + filename);
|
||||
new Pageres()//{delay:1}
|
||||
.src(nconf.get('BASE_URL') + '/export/avatar-' + req.params.uuid + '.html', ['140x147'], {crop: true, filename: filename.replace('.png', '')})
|
||||
.run(function (err, file) {
|
||||
if (err) return next(err);
|
||||
// see http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#createMultipartUpload-property
|
||||
.run()
|
||||
.then(function (file) {
|
||||
var upload = s3Stream.upload({
|
||||
Bucket: bucket,
|
||||
Key: filename,
|
||||
|
|
@ -133,6 +132,6 @@ dataexport.avatarImage = function(req, res, next) {
|
|||
res.redirect(details.Location);
|
||||
});
|
||||
file[0].pipe(upload);
|
||||
});
|
||||
}).catch(next);
|
||||
})
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue