What if the background request.form of the blob object cannot be obtained by using formData?

Front-end js code

            var reader = new FileReader();
            reader.readAsArrayBuffer(file);    //excel        
            reader.onload = function () {
                //alert("load");
                var blob = new Blob([reader.result]);
                //
                var fd = new FormData();
                fd.append("data", blob);
                fd.append("filename", file.name);
                var aa=fd.get("data");   ///
                var xhr = new XMLHttpRequest();
                xhr.open("post",
                    "../UploadExcel",
                    true);
                xhr.onreadystatechange = function () {
                    if (xhr.readyState == 4 && xhr.status == 200) {
                        var data = eval("(" + xhr.responseText + ")");
                        console.info(data);
                        if (data.success) {
                            //
                            var imgName = data.msg;
                            alert(imgName);
                        } else {
                            alert(data.msg);
                        }
                    }
                }
                //
                xhr.send(fd);
            }

background c-sharp does not use any framework, the most basic controller

[HttpPost]
        public string UploadExcel()
        {
            HttpRequestBase req = Request;
            string newname = Request.Form["filename"];
            Request.Form["data"];   //stringRequest.Formkey
            return null;
        }

Jun.24,2021

solved, the original file is stored in Request.files. Only ordinary string strings from the front desk

are stored in Params and Form.
Menu