Browse Source

添加文件类型

xiaohaizhao 2 months ago
parent
commit
ab0037d869
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/Yl_Upload/index.js

+ 1 - 1
components/Yl_Upload/index.js

@@ -88,7 +88,7 @@ Component({
                 method: "PUT",
                 data: data,
                 header: {
-                    'content-type': 'application/octet-stream'
+                    'content-type': res.filetype == 'pdf' ? "application/pdf" : 'application/octet-stream'
                 },
                 success(a) {
                     _Http.basic({