mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 06:57:12 +08:00
revert: 头像不再存储为 base64,而是存储到文件管理中 (#142)
This commit is contained in:
@@ -29,6 +29,11 @@ public class ContainerConstants {
|
||||
*/
|
||||
public static final String USER_NICKNAME = "UserNickname";
|
||||
|
||||
/**
|
||||
* 文件信息
|
||||
*/
|
||||
public static final String FILE_INFO = "FileInfo";
|
||||
|
||||
/**
|
||||
* 用户角色 ID 列表
|
||||
*/
|
||||
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 系统文件相关常量
|
||||
*
|
||||
* @author luoqiz
|
||||
* @since 2025/3/12 18:11
|
||||
*/
|
||||
public class SysFileConstants {
|
||||
|
||||
/**
|
||||
* 用户头像路径前缀
|
||||
*/
|
||||
public static final String USER_AVATAR_PATH = "user/avatar/";
|
||||
|
||||
/**
|
||||
* 默认文件路径
|
||||
*/
|
||||
public static String getDefaultFilePath() {
|
||||
LocalDate today = LocalDate.now();
|
||||
String path = today.getYear() + StringConstants.SLASH + today.getMonthValue() + StringConstants.SLASH + today
|
||||
.getDayOfMonth() + StringConstants.SLASH;
|
||||
return path;
|
||||
}
|
||||
|
||||
private SysFileConstants() {
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user