20260515173434

This commit is contained in:
oneao committed 2026-05-15 17:34:35 +08:00
1 parent 5816c5daa6
commit 2e704bbbb0
1 file changed
+1 -7
@@ -193,14 +193,10 @@ public class FileController {
// 4. 雪花 ID(唯一)
long nextId = UniqueId.nextId();
// 5. 分桶(0-ff)
String bucket = String.format("%02x", nextId & 0xff);
// 6. 构建目录:日期 + 分桶
String fullDirPath = PathUtils.joinFilePath(
basePath,
datePath,
bucket
datePath
);
// 7. 创建目录(幂等)
@@ -221,7 +217,6 @@ public class FileController {
String relativePath = PathUtils.joinFilePath(
fileConfig.getContainerDir(),
datePath,
bucket,
newFileName
);
@@ -238,7 +233,6 @@ public class FileController {
result.put("path", relativePath);
result.put("uid", nextId);
result.put("fileName", fileName);
result.put("bucket", bucket);
return Result.ok(result);
}