Ver código fonte

文件存储地址修改

user5 2 anos atrás
pai
commit
d448fc4d5b
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/api/sys/OSSService.js

+ 2 - 1
src/api/sys/OSSService.js

@@ -116,7 +116,7 @@ export function httpRequest (file, name, type) { // 阿里云OSS上传
   const year = now.getFullYear()
   const month = now.getMonth() + 1
   const day = now.getDate() > 10 ? now.getDate() : '0' + now.getDate()
-  const filePath = 'attachment-file/' + type + '/' + year + '/' + month + '/' + day + '/' + now.getTime()
+  const filePath = '/attachment-file/assess/' + type + '/' + year + '/' + month + '/' + day + '/' + now.getTime()
   console.log(filePath, '文件存储路径')
   const fileName = filePath + name + '.' + exname
   console.log(fileName, '文件名')
@@ -128,6 +128,7 @@ export function httpRequest (file, name, type) { // 阿里云OSS上传
     }
   ).then(res => {
     console.log(res, 'res---header ')
+    return fileName
   }).catch(err => {
     console.log(err, 'err')
   })