From d51c9bdbd2258f42404a0b218242168f3521459c Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Tue, 7 Nov 2023 13:45:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20file=20storage=20leading=20slash?= =?UTF-8?q?=20removed=20(#243)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tdrive/backend/node/src/core/platform/services/storage/index.ts | 2 +- tdrive/backend/node/src/services/files/services/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/core/platform/services/storage/index.ts b/tdrive/backend/node/src/core/platform/services/storage/index.ts index be980b606..0dc5466aa 100644 --- a/tdrive/backend/node/src/core/platform/services/storage/index.ts +++ b/tdrive/backend/node/src/core/platform/services/storage/index.ts @@ -23,7 +23,7 @@ export default class StorageService extends TdriveService implements private encryptionOptions: EncryptionConfiguration; private algorithm = "aes-256-cbc"; - private homeDir = "tdrive"; + private homeDir = "/tdrive"; api(): StorageAPI { return this; diff --git a/tdrive/backend/node/src/services/files/services/index.ts b/tdrive/backend/node/src/services/files/services/index.ts index 56729d896..9766ab036 100644 --- a/tdrive/backend/node/src/services/files/services/index.ts +++ b/tdrive/backend/node/src/services/files/services/index.ts @@ -311,7 +311,7 @@ export class FileServiceImpl { } function getFilePath(entity: File): string { - return `/${gr.platformServices.storage.getHomeDir()}/files/${entity.company_id}/${ + return `${gr.platformServices.storage.getHomeDir()}/files/${entity.company_id}/${ entity.user_id || "anonymous" }/${entity.id}`; }