Using the ABP framework, the zero module is used. Then use the element UI to upload the image. A "Request for error" occurred.
It works correctly when transmitting data to an interface using Postman.
After several twists and turns, finally found the problem is Nati token problem. https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=10025&sid=5b3ace20a25195168c29846975df630d
Because the element UI is not part of the ABP. The AJAX request he used did not contain the Antiforgery token. so the ABP framework is considered a cross-site attack request, so a 400 error is returned. In the same way, using jquery's AJAX approach to request data can be a mistake.
The postman can be requested correctly because Postman does not use the APB View page and Antiforgery token is not set. so you can upload files.
The workaround is to add X-xsrf-token to the request header.
So the question becomes, how to get Antiforgery token.
The answer is, using the ABP encapsulation method: Abp.security.antiForgery.getToken (). Https://aspnetboilerplate.com/Pages/Documents/XSRF-CSRF-Protection
ABP Zero Ajax Request (file upload) The problem is resolved by a bad request error