From 9f199c06f1a1c822cbca1972f1b0c82b800c8e5e Mon Sep 17 00:00:00 2001 From: Nevo David Date: Thu, 14 Mar 2024 17:18:10 +0700 Subject: [PATCH] feat: fix path --- .../nestjs-libraries/src/database/prisma/posts/posts.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts index 6fc8564c..448043f4 100644 --- a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts +++ b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts @@ -146,7 +146,7 @@ export class PostsService { m.path : m.path, type: 'image', - path: process.env.UPLOAD_DIRECTORY + m.path, + path: m.path.indexOf('http') === -1 ? process.env.UPLOAD_DIRECTORY + m.path : m.path, })), })) );