diff --git a/apps/server/src/integrations/storage/drivers/local.driver.ts b/apps/server/src/integrations/storage/drivers/local.driver.ts index 36d9ca9e..caa6ab36 100644 --- a/apps/server/src/integrations/storage/drivers/local.driver.ts +++ b/apps/server/src/integrations/storage/drivers/local.driver.ts @@ -40,8 +40,11 @@ export class LocalDriver implements StorageDriver { async copy(fromFilePath: string, toFilePath: string): Promise { try { + const fromFullPath = this._fullPath(fromFilePath); + const toFullPath = this._fullPath(toFilePath); + if (await this.exists(fromFilePath)) { - await fs.copy(fromFilePath, toFilePath); + await fs.copy(fromFullPath, toFullPath); } } catch (err) { throw new Error(`Failed to copy file: ${(err as Error).message}`);