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 + ')' }