文件路径问题修改
This commit is contained in:
parent
978b022d54
commit
ab2bbfd990
|
@ -7,16 +7,16 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Getter;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum FilePathEnum {
|
||||
|
||||
IMAGE("/static/image/", "/image/"),
|
||||
IMAGE_TEMP("/static/image/temp/", "/image/temp/"),
|
||||
VIDEO("/static/video/", "/video/"),
|
||||
AUDIO("/static/audio/", "/audio/"),
|
||||
IMAGE("/static/image/", "image"),
|
||||
IMAGE_TEMP("/static/image/temp/", "image-temp"),
|
||||
VIDEO("/static/video/", "video"),
|
||||
AUDIO("/static/audio/", "audio"),
|
||||
;
|
||||
|
||||
@Getter
|
||||
private final String urlPath;
|
||||
private final String fileRelativePath;
|
||||
|
||||
|
@ -28,7 +28,7 @@ public enum FilePathEnum {
|
|||
* @date 2025/06/23 14:46
|
||||
**/
|
||||
public String getFileAbsolutePath() {
|
||||
return SpringUtil.getBean(Environment.class).getProperty("upload.save-path") + fileRelativePath;
|
||||
return SpringUtil.getBean(Environment.class).getProperty("upload.save-path") + fileRelativePath + FileUtil.FILE_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -191,7 +191,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
|||
result.add(FilePathEnum.IMAGE.getImageDownPath(path));
|
||||
}
|
||||
String partId = imageWorkReq.getPartId();
|
||||
if (Objects.nonNull(partId)) {
|
||||
if (StrUtil.isNotEmpty(partId)) {
|
||||
ImageCollectEntity imageCollect = new ImageCollectEntity();
|
||||
imageCollect.setCollectId(IdUtil.simpleUUID());
|
||||
imageCollect.setCollectorName(imageWorkReq.getUploadUser());
|
||||
|
|
Loading…
Reference in New Issue