1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-21 01:34:51 +00:00

AWS Plugin: Add s3-savetiddlers command

This commit is contained in:
Jermolene
2017-08-16 18:10:52 +01:00
parent 7e88dd788c
commit 2ebf4285e8
3 changed files with 52 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ bucketName:
title:
callback: invoked with (err,{body:,type:}
*/
function getTextFile(region,bucketName,title,callback) {
function getFile(region,bucketName,title,callback) {
console.log("Reading file from S3",bucketName,title)
var AWS = require("aws-sdk"),
s3bucket = new AWS.S3({
@@ -45,7 +45,7 @@ console.log("Reading file from S3",bucketName,title)
/*
Put a file to an S3 bucket
*/
function putTextFile(region,bucketName,title,text,type,callback) {
function putFile(region,bucketName,title,text,type,callback) {
console.log("Writing file to S3",bucketName,title,type)
var AWS = require("aws-sdk"),
s3bucket = new AWS.S3({
@@ -61,7 +61,7 @@ console.log("Writing file to S3",bucketName,title,type)
s3bucket.upload(params,callback);
}
exports.putTextFile = putTextFile;
exports.getTextFile = getTextFile;
exports.putFile = putFile;
exports.getFile = getFile;
})();