美文网首页
多文件上传post

多文件上传post

作者: 程序员不务正业 | 来源:发表于2020-03-16 17:58 被阅读0次
    var fileList = this.$refs["itemuploadfile"].uploadFiles;
            var formData = new FormData();
            for (let index = 0; index < fileList.length; index++) {
              var fileObj = fileList[index].raw;
              formData.append("files", fileObj);
            }
            formData.append("identCode", "0");
            formData.append("identName", "0");
            formData.append("tagCode", "1");
            formData.append("tagName", "1");
            var self = this;
            ident_uploads(formData).then((res) => {
              console.log('upload file response', res)
              if (res) {
                self.$message.success("上传成功");
                self.getFileList();
              }
            })
    

    相关文章

      网友评论

          本文标题:多文件上传post

          本文链接:https://www.haomeiwen.com/subject/ctgnehtx.html