统一 FileApi 的封装,与 yudao-cloud~

This commit is contained in:
YunaiV
2022-06-15 20:59:48 +08:00
parent d3fe187696
commit 9c5befaf9d
4 changed files with 10 additions and 8 deletions

View File

@ -13,7 +13,7 @@ public interface FileApi {
* @param content 文件内容
* @return 文件路径
*/
default String createFile(byte[] content) throws Exception {
default String createFile(byte[] content) {
return createFile(null, null, content);
}
@ -24,18 +24,18 @@ public interface FileApi {
* @param content 文件内容
* @return 文件路径
*/
default String createFile(String path, byte[] content) throws Exception {
default String createFile(String path, byte[] content) {
return createFile(null, path, content);
}
/**
* 保存文件,并返回文件的访问路径
*
* @param name 文件名称
* @param name 文件名称
* @param path 文件路径
* @param content 文件内容
* @return 文件路径
*/
String createFile(String name, String path, byte[] content) throws Exception;
String createFile(String name, String path, byte[] content);
}