From 4a86adcbe39a4a265b81c5845c9db000220e75d8 Mon Sep 17 00:00:00 2001 From: Badri Sunderarajan Date: Mon, 4 May 2020 18:21:59 +0530 Subject: [PATCH] Upload files one at a time to avoid race-conditions --- functions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.js b/functions.js index d44ba02..e28141d 100644 --- a/functions.js +++ b/functions.js @@ -190,7 +190,9 @@ class Seance { // upload pic to server console.debug(`Adding to upload queue: ${imageName}`) uploadedImages.push(imageName) - this.uploadDav(davPath, imagePath) + + // Let's wait for the upload, just to avoid conflicts + await this.uploadDav(davPath, imagePath) newLine = '![' + imageAlt + '](' + uploadedPath + '/' + imageName + ')' }