add osupload log
This commit is contained in:
parent
2e7ab01ed6
commit
49e175c0a1
@ -3,6 +3,7 @@ package com.knowledge.base.infrastructure.north.controller;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.knowledge.base.application.service.DocAppService;
|
||||
import com.knowledge.base.application.service.UserAppService;
|
||||
import com.knowledge.base.domain.common.enums.DocMetaPropEnum;
|
||||
@ -143,6 +144,7 @@ public class FileWriteController {
|
||||
// file字段在主线程停止后,会自动删除,因此需要先转出来
|
||||
byte[] fileBytes = file.getBytes();
|
||||
|
||||
logger.info("[FileWriteController#uploadFolderToOS] 已上传至对象存储: {}", originalName);
|
||||
ThreadPoolUtil.execute(() ->
|
||||
handleAsyncRecord(finalToken, bucket, originFileNameWithSuffix, suffix, s3FullPath, finalUrl, fileBytes, searchable)
|
||||
);
|
||||
@ -217,6 +219,7 @@ public class FileWriteController {
|
||||
dto.setUploadTime(now.toString());
|
||||
dto.setExpireTime(expireTime.toString());
|
||||
docAppService.saveOSUplodRecord(dto);
|
||||
logger.info("[OS异步写入] 初始化上传记录成功. OSRecordDTO = {}", JSONUtil.toJsonStr(dto));
|
||||
|
||||
// 允许保存到本地
|
||||
if (allowSaveToLocal) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user