Explorar o código

添加文件类型

xiaohaizhao hai 2 meses
pai
achega
ab0037d869
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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({