diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java index 3dc49738a..3ec24c9b1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java @@ -55,7 +55,7 @@ public class FileController { @ApiImplicitParam(name = "file", value = "文件附件", required = true, dataTypeClass = MultipartFile.class), }) public CommonResult uploadFile(@RequestParam("file") MultipartFile file) throws Exception { - String path = DateUtil.format(new Date(), "yyyy/MM/dd/") + file.getName(); + String path = DateUtil.format(new Date(), "yyyy/MM/dd/") + file.getOriginalFilename(); return success(fileService.createFile(path, IoUtil.readBytes(file.getInputStream()))); } diff --git a/yudao-ui-admin/src/components/ImageUpload/index.vue b/yudao-ui-admin/src/components/ImageUpload/index.vue index 170c1bd08..3462f250d 100644 --- a/yudao-ui-admin/src/components/ImageUpload/index.vue +++ b/yudao-ui-admin/src/components/ImageUpload/index.vue @@ -77,7 +77,7 @@ export default { dialogVisible: false, hideUpload: false, baseUrl: process.env.VUE_APP_BASE_API, - uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 + uploadImgUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/simple-upload", // 上传的图片服务器地址 headers: { Authorization: "Bearer " + getToken(), }, diff --git a/yudao-ui-admin/src/views/mall/product/category/index.vue b/yudao-ui-admin/src/views/mall/product/category/index.vue index cfef21c0f..751ad9c52 100644 --- a/yudao-ui-admin/src/views/mall/product/category/index.vue +++ b/yudao-ui-admin/src/views/mall/product/category/index.vue @@ -95,7 +95,7 @@ - +