FormData文件上传响应302和200

这里使用 new window.FormData() 方式,代码也是考的同事的,他那边不限制文件类型,我使用的时候对一些jar exe等文件类型就不支持,目前自己试出来一些常见的格式,先做的上传文件类型限制,但还是想解决一下;问题具体表现为http响应302和一个200的,可以看截图:
这是我的上传文件的js:

            //附件上传   
            attachFileChange: function() {
            const fileTypes = "doc,docx,xls,xlsx,pdf,ppt,pptx,txt,jpg,jpeg,png,bmp,gif,zip,rar";
            const fileTypeArray = fileTypes.split(",");

            const attachFile = $("#attachFile").get(0).files[0];
            /*
            const filePathArray = attachFile.name.toLowerCase().split('.');
            const fileType = filePathArray[filePathArray.length - 1];
             if (_.indexOf(fileTypeArray, fileType) == -1) {
               HyMessage({
                 message: `支持的附件格式【${fileTypes}】,当前格式:${fileType}。`,
                 type: 'warning'
               });
              return;
            }
            */

            const me = this;
            const formData = new window.FormData();
            formData.append("file", attachFile);
      
            $.ajax({
              type: "POST",
              data: formData,
              contentType: false,
              processData: false,
              url: $$pageContextPath+'dynamics/uploadDynamicsAttachFile?t='+new Date().getTime(),
              success: response => {
                 //xxxxxx
              },
            });

上传成功:

img

上传失败会响应两个(302+200):

img

响应的302:

img

响应的200:

img

自己排查错误nginx是没有问题的,去掉nginx也测过,百度也无果。

你响应302的那个链接,你去除下时间戳试试;

估计是被nginx给缓存了