|
|
|
|
@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.file.core.client.FileClient;
|
|
|
|
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.file.FilePageReqVO;
|
|
|
|
|
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO;
|
|
|
|
|
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper;
|
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
@ -37,7 +38,8 @@ public class FileServiceImpl implements FileService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String createFile(String name, String path, byte[] content) throws Exception {
|
|
|
|
|
@SneakyThrows
|
|
|
|
|
public String createFile(String name, String path, byte[] content) {
|
|
|
|
|
// 计算默认的 path 名
|
|
|
|
|
String type = FileTypeUtil.getType(new ByteArrayInputStream(content), name);
|
|
|
|
|
if (StrUtil.isEmpty(path)) {
|
|
|
|
|
|