From df2e554147c47192ad23f350123927c97f6f8469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=B5=A9=E6=9E=97?= Date: Fri, 19 Apr 2024 14:51:01 +0800 Subject: [PATCH] =?UTF-8?q?[Bug]:=20=E7=94=B3=E8=AF=B7=E5=8D=95=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90=E7=9A=84key=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=80=BC=E5=BC=82=E5=B8=B8=20#6610?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/service-files/main/default/manager/file.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/service-files/main/default/manager/file.js b/services/service-files/main/default/manager/file.js index 701d580b05..eb6a57f57d 100644 --- a/services/service-files/main/default/manager/file.js +++ b/services/service-files/main/default/manager/file.js @@ -1,8 +1,8 @@ /* * @Author: sunhaolin@hotoa.com * @Date: 2022-06-09 09:36:43 - * @LastEditors: liaodaxue - * @LastEditTime: 2023-06-16 15:56:45 + * @LastEditors: 孙浩林 sunhaolin@steedos.com + * @LastEditTime: 2024-04-19 14:47:44 * @Description: 文件类,处理文件保存 */ 'use strict'; @@ -148,8 +148,8 @@ class File { const absolutePath = path.resolve(pathname); // 如果文件夹不存在,则创建文件夹 mkdirp.sync(absolutePath); - - return customPathPrefix + '/' + fsCollectionName + '-' + _id + '-' + final_filename; + const fullpath = path.join(customPathPrefix, fsCollectionName + '-' + _id + '-' + final_filename) + return fullpath; } else { return fsCollectionName + '/' + fsCollectionName + '-' + _id + '-' + final_filename;