From 42cc48b2a152bbff574602fac02b22e97d2e659b Mon Sep 17 00:00:00 2001 From: Romaric Mourgues Date: Thu, 10 Mar 2022 18:58:23 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Fix=20previews=20not=20generated?= =?UTF-8?q?=20(#2011)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twake/backend/node/src/services/files/services/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twake/backend/node/src/services/files/services/index.ts b/twake/backend/node/src/services/files/services/index.ts index 7a4bb899d9..07442e0588 100644 --- a/twake/backend/node/src/services/files/services/index.ts +++ b/twake/backend/node/src/services/files/services/index.ts @@ -166,6 +166,9 @@ class Service implements FileServiceAPI { await this.repository.save(entity); try { + //On OVH S3 the file isn't accessible right way so we wait a second + await new Promise(r => setTimeout(r, 1000)); + await this.pubsub.publish("services:preview", { data: { document, output }, });