From c9df78a667203f5af5eba04c2982db2cc17ae917 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 13 Dec 2016 20:32:57 -0500 Subject: [PATCH] add to s3 script --- server/utils/db_reformat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/utils/db_reformat.js b/server/utils/db_reformat.js index 8d85da0e..d1beb6f9 100644 --- a/server/utils/db_reformat.js +++ b/server/utils/db_reformat.js @@ -55,12 +55,13 @@ objectsResponse.on('end', () => { uploadedFiles.forEach(fileKey => { if (s3Files.indexOf(fileKey) === -1) { //delete file - filesToDelete.push(fileKey); + filesToDelete.push({Key: fileKey}); // console.log("would delete file: ", fileKey); } }); console.log("To delete: ", filesToDelete.length); console.log("Total S3 files: ", uploadedFiles.length); + console.log("Total S3 files in mongo: ", s3Files.length); }); // let projectsNotToUpdate;