Browse Source

修改本地上传方式的返回值为文件信息

NorthLan 6 years ago
parent
commit
69caa64ebb

+ 2 - 2
zen-web/src/main/kotlin/com/gxzc/zen/web/sys/controller/UploadController.kt

@@ -42,7 +42,7 @@ class UploadController : BaseController() {
                 CheckStatus.FILE_EXISTS,
                 CheckStatus.NO_FILE_FULL_CHUNK -> {
                     // 文件存在
-                    ret.info = fileMetadata
+                    ret.info = ret.file
                 }
                 CheckStatus.NO_FILE_FRAG_CHUNK -> {
                 }
@@ -70,7 +70,7 @@ class UploadController : BaseController() {
             when (uploadResult.status) {
             // 单文件完成,插入数据库
                 UploadStatus.UPLOADED -> {
-                    uploadResult.info = fileMetadata
+                    uploadResult.info = uploadResult.file
                 }
             }
             ResponseEntity.ok(uploadResult)

+ 2 - 2
zen-web/src/main/resources/application-fs.yml

@@ -13,8 +13,8 @@ fs:
 
 # 自定义配置
 upload:
-  tmpPath: /tmp # D:\\tmp # 临时文件存放位置 默认 /tmp/zen
-  dataPath: /archives/upload # D:\\data
+  tmpPath: D:\\tmp # D:\\tmp # 临时文件存放位置 默认 /tmp/zen
+  dataPath: D:\\data # D:\\data
 
 fdfs:
   enabled: true