I am having the following code, to upload a file using spring boot application.
@PostMapping(value = "/upload" , consumes = "multipart/form-data")
public String uploadFile(@RequestPart("file") MultipartFile file){
return file.getName();
}
When I run the application in a new spring boot application, it is working fine. But when I use the same code on a different application, I am getting the following error.
UnicodeDecodeError while processing HTTP request: 'utf-8' codec can't decode byte 0xff in position 146: invalid start byte.
Is there any way, we can make the spring boot to show detailed error in this case?