fix:文件上传优化
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
package org.nl.dev.api;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import org.nl.dev.dto.DevFileApiDto;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
@@ -109,7 +110,7 @@ public interface DevFileApi {
|
||||
* @author chengchuanyao
|
||||
* @date 2024/7/26 16:10
|
||||
*/
|
||||
JSONObject getFileInfoById(String id);
|
||||
DevFileApiDto getFileInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 通过文件地址获取文件信息
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.nl.dev.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DevFileApiDto {
|
||||
|
||||
/** id */
|
||||
@Schema(description = "id")
|
||||
private String id;
|
||||
|
||||
/** 存储引擎 */
|
||||
@Schema(description = "存储引擎")
|
||||
private String engine;
|
||||
|
||||
/** 存储桶 */
|
||||
@Schema(description = "存储桶")
|
||||
private String bucket;
|
||||
|
||||
/** 文件名称 */
|
||||
@Schema(description = "文件名称")
|
||||
private String name;
|
||||
|
||||
/** 文件后缀 */
|
||||
@Schema(description = "文件后缀")
|
||||
private String suffix;
|
||||
|
||||
/** 文件大小kb */
|
||||
@Schema(description = "文件大小kb")
|
||||
private String sizeKb;
|
||||
|
||||
/** 文件大小(格式化后) */
|
||||
@Schema(description = "文件大小(格式化后)")
|
||||
private String sizeInfo;
|
||||
|
||||
/** 文件的对象名(唯一名称) */
|
||||
@Schema(description = "文件的对象名(唯一名称)")
|
||||
private String objName;
|
||||
|
||||
/** 文件存储路径 */
|
||||
@Schema(description = "文件存储路径")
|
||||
private String storagePath;
|
||||
|
||||
/** 文件下载路径 */
|
||||
@Schema(description = "文件下载路径")
|
||||
private String downloadPath;
|
||||
|
||||
/** 图片缩略图 */
|
||||
@Schema(description = "图片缩略图")
|
||||
private String thumbnail;
|
||||
|
||||
/** 扩展信息 */
|
||||
@Schema(description = "扩展信息")
|
||||
private String extJson;
|
||||
}
|
||||
Reference in New Issue
Block a user