From c0f7c85d007b902ee8591e4f32c0aff4ff58ac33 Mon Sep 17 00:00:00 2001 From: Kaede Fujisaki Date: Wed, 11 May 2022 04:31:50 +0900 Subject: [PATCH] Convert in sequential --- server/src/shelf/Shelf.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/shelf/Shelf.ts b/server/src/shelf/Shelf.ts index 73d5c0b..149898c 100644 --- a/server/src/shelf/Shelf.ts +++ b/server/src/shelf/Shelf.ts @@ -165,12 +165,10 @@ class Shelf { let newEntity: Entity; switch (entity.type) { case 'image': { - await Promise.all([ - resizeImage(originalPath, mediumPath, 2048), - makeImageIcon(originalPath, iconPath, 256), - ]); const mediumID = await this.storage.medium.upload(mediumPath); + await resizeImage(originalPath, mediumPath, 2048); const iconID = await this.storage.icon.upload(iconPath); + await makeImageIcon(originalPath, iconPath, 256); newEntity = { type: 'image', id: entity.id,