mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
AWS Plugin: improved error handling
This commit is contained in:
parent
51b1ead5c9
commit
5a5d648127
@ -62,7 +62,12 @@ function putFile(region,bucketName,title,text,type,callback) {
|
||||
Body: new Buffer(text,encoding),
|
||||
ContentType: type || "text/plain"
|
||||
};
|
||||
s3bucket.upload(params,callback);
|
||||
s3bucket.upload(params,function(err,data) {
|
||||
if(err) {
|
||||
return callback(err + " (writing " + title + " to " + bucketName + ", type " + type + ")");
|
||||
}
|
||||
callback(null,data);
|
||||
});
|
||||
}
|
||||
|
||||
exports.putFile = putFile;
|
||||
|
Loading…
Reference in New Issue
Block a user