This commit is contained in:
Luke.Ye 2025-07-04 14:19:32 +08:00
commit 7614196f5e
2 changed files with 2 additions and 1 deletions

View File

@ -182,6 +182,7 @@ public class FileWriteController {
private void handleAsyncRecord(String token, String bucket, String originFileNameWithSuffix, String suffix,
String s3FullPath, String url, byte[] fileBytes, boolean searchable) {
try {
logger.info("[OS异步写入] 开始保存文件上传记录. fileName = {}", originFileNameWithSuffix);
Optional<UserDTO> userDTO = userAppService.findUserByToken(token);
if (userDTO.isEmpty() || StrUtil.isBlank(userDTO.get().getUsername())) {
logger.warn("异步写入失败:无法获取用户名");

View File

@ -74,7 +74,7 @@ public class HttpHelper {
Request.Builder builder = new Request.Builder().url(url);
if (token != null && !token.isBlank()) {
builder.header("Authorization", token);
builder.header("Authorization", "Bearer " + token);
}
switch (method.toUpperCase()) {