Upload files one at a time to avoid race-conditions

This commit is contained in:
Badri Sunderarajan 2020-05-04 18:21:59 +05:30
parent 0d8c6c6adc
commit 4a86adcbe3

View file

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