mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 11:05:06 +08:00
!186 文件表建加原文件名称字段original_name,相关代码修改
Merge pull request !186 from 谢谢的谢/master
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
package cn.iocoder.yudao.module.infra.api.file;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
|
||||
/**
|
||||
* 文件 API 接口
|
||||
*
|
||||
@ -15,9 +13,9 @@ public interface FileApi {
|
||||
* @param content 文件内容
|
||||
* @return 文件路径
|
||||
*/
|
||||
default String createFile(byte[] content) throws Exception {
|
||||
return createFile(IdUtil.fastUUID(), content);
|
||||
}
|
||||
default String createFile(byte[] content) throws Exception {
|
||||
return createFile(null, null, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存文件,并返回文件的访问路径
|
||||
@ -26,6 +24,18 @@ public interface FileApi {
|
||||
* @param content 文件内容
|
||||
* @return 文件路径
|
||||
*/
|
||||
String createFile(String path, byte[] content) throws Exception;
|
||||
default String createFile(String path, byte[] content) throws Exception {
|
||||
return createFile(null, path, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存文件,并返回文件的访问路径
|
||||
*
|
||||
* @param name 原文件名称
|
||||
* @param path 文件路径
|
||||
* @param content 文件内容
|
||||
* @return 文件路径
|
||||
*/
|
||||
String createFile(String name, String path, byte[] content) throws Exception;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user