Преглед изворни кода

允许同名文件同时上传

xiaohaizhao пре 1 година
родитељ
комит
70cb52cee7
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      Eservice/components/autoUpload/upload.js
  2. 1 1
      Eservice/components/upload/upload.js

+ 1 - 1
Eservice/components/autoUpload/upload.js

@@ -146,7 +146,7 @@ Component({
         "classname": "system.attachment.huawei.OBS",
         "method": "getFileName",
         "content": {
-          "filename": file.name,
+          "filename": file.name.concat(Date.now(), ".").concat(ext),
           "filetype": ext,
           "parentid": this.data.parentid
         }

+ 1 - 1
Eservice/components/upload/upload.js

@@ -112,7 +112,7 @@ Component({
         "classname": "system.attachment.huawei.OBS",
         "method": "getFileName",
         "content": {
-          "filename": file.name,
+          "filename": file.name.concat(Date.now(), ".").concat(ext),
           "filetype": ext,
           "parentid": this.data.parentid
         }