Paul Clapham wrote:
It will work nicely if request.getCharacterEncoding() is UTF-8, in which case it does nothing and you don't need that code. If it isn't UTF-8 then it's going to damage the data as outlined above.
Yes, request.getCharacterEncoding() is UTF-8. In theory it will be well worked, but when file name contains Chinese character, It still turn to ???. I try to many ways , but failed...
login:1 Access to XMLHttpRequest at 'http://localhost:8080/login/userLogin' from origin 'http://localhost:8081' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.