From ab4c39e22a387b2c819453f678467801abe6ebcf Mon Sep 17 00:00:00 2001 From: Anton SHEPILOV Date: Wed, 8 Jan 2025 15:46:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9Bdo=20not=20generate=20thumbnails=20?= =?UTF-8?q?tmp=20until=20it=20will=20be=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/backend/node/src/services/documents/services/index.ts | 2 +- tdrive/backend/node/src/services/documents/utils.ts | 2 +- .../node/src/services/documents/web/controllers/documents.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tdrive/backend/node/src/services/documents/services/index.ts b/tdrive/backend/node/src/services/documents/services/index.ts index 8f3b840d..cc048c6f 100644 --- a/tdrive/backend/node/src/services/documents/services/index.ts +++ b/tdrive/backend/node/src/services/documents/services/index.ts @@ -403,7 +403,7 @@ export class DocumentsService { company_id: driveItem.company_id, }, context, - { waitForThumbnail: true }, + { waitForThumbnail: false }, ); } diff --git a/tdrive/backend/node/src/services/documents/utils.ts b/tdrive/backend/node/src/services/documents/utils.ts index a503e9ef..c55dec7e 100644 --- a/tdrive/backend/node/src/services/documents/utils.ts +++ b/tdrive/backend/node/src/services/documents/utils.ts @@ -475,7 +475,7 @@ export const getFileMetadata = async ( company_id: context.company.id, }, context, - { ...(context.user?.server_request ? {} : { waitForThumbnail: true }) }, + { ...(context.user?.server_request ? {} : { waitForThumbnail: false }) }, ); if (!file) { diff --git a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts index 348971fa..9d9b93b4 100644 --- a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts +++ b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts @@ -63,8 +63,8 @@ export class DocumentsController { chunkNumber: parseInt(q.resumableChunkNumber || q.chunk_number) || 1, filename: q.resumableFilename || q.filename || file?.filename || undefined, type: q.resumableType || q.type || file?.mimetype || undefined, - waitForThumbnail: !!q.thumbnail_sync, - ignoreThumbnails: false, + waitForThumbnail: false, + ignoreThumbnails: true, }; createdFile = await globalResolver.services.files.save(null, file, options, context);