mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-21 01:34:51 +00:00
AWS Plugin: Lambda should return list of files written to S3
This commit is contained in:
@@ -20,7 +20,7 @@ title:
|
||||
callback: invoked with (err,{body:,type:}
|
||||
*/
|
||||
function getFile(region,bucketName,title,callback) {
|
||||
console.log("Reading file from S3",bucketName,title)
|
||||
console.log("Reading file from S3",bucketName,title);
|
||||
var AWS = require("aws-sdk"),
|
||||
s3bucket = new AWS.S3({
|
||||
region: region
|
||||
@@ -46,7 +46,11 @@ console.log("Reading file from S3",bucketName,title)
|
||||
Put a file to an S3 bucket
|
||||
*/
|
||||
function putFile(region,bucketName,title,text,type,callback) {
|
||||
console.log("Writing file to S3",bucketName,title,type)
|
||||
// Log the write
|
||||
if($tw["lambda-result"]) {
|
||||
$tw["lambda-result"]["files-written"].push({bucket: bucketName,key: title});
|
||||
}
|
||||
console.log("Writing file to S3",bucketName,title,type);
|
||||
var AWS = require("aws-sdk"),
|
||||
s3bucket = new AWS.S3({
|
||||
region: region
|
||||
|
||||
Reference in New Issue
Block a user