Browse Source

修改网关在下载文件时产生错误

fwinfo 7 months ago
parent
commit
93df7597b6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      service-gateway/app/controller/home.js

+ 5 - 0
service-gateway/app/controller/home.js

@@ -49,6 +49,11 @@ class HomeController extends Controller {
       options.headers = form.headers();
       options['Content-Type'] = 'multipart/form-data';
     }
+
+    if (method == 'filesDownload') {
+      delete options.dataType
+    }
+
     // 发送请求
     let res;
     try {