java.nio.file.NoSuchFileException: C:\Users\Acer\AppData\Local\Temp\tomcat.8080.66613 37595585751026\work\Tomcat\localhost\ROOT\upload_a 7fc4496_5fd8_44d7_877a_117426ad0688_00000000.tmp

I got this error when I uploaded an image through RestTemplate

My code :

public ResponseEntity<?> card(MultipartFile multipartFile, String name) {
// Validate request data
Validator validator = Validation.buildDefaultValidatorFactory().getValid ator();
Set<ConstraintViolation<String>> violations = validator.validate(name);
if (!violations.isEmpty()) {
List<String> errorMessages = new ArrayList<>();
for (ConstraintViolation<String> violation : violations) {
errorMessages.add(violation.getMessage());
}
return ResponseEntity.badRequest().body(errorMessages);
}

// Prepare JSON data
Map<String, Object> jsonData = new HashMap<>();
jsonData.put("active", true);
jsonData.put("name", name);
jsonData.put("watch_lists", Collections.singletonList(workerWatchList));

// Send HTTP request to add card
HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", token);
HttpEntity<Map<String, Object>> addCardRequest = new HttpEntity<>(jsonData, headers);
ResponseEntity<Map<String, Object>> addCardResponse = new RestTemplate().exchange(
baseUrl + "/cards/humans/",
HttpMethod.POST,
addCardRequest,
new ParameterizedTypeReference<Map<String, Object>>() {
}
);
if (addCardResponse.getStatusCode() != HttpStatus.CREATED) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_E RROR).body("Failed to add card");
}
Map<String, Object> addCardData = addCardResponse.getBody();
int cardId = (int) addCardData.get("id");
System.out.println(cardId);

// Send HTTP request to add face
MultiValueMap<String, Object> addFaceData = new LinkedMultiValueMap<>();
addFaceData.add("source_photo", multipartFile.getResource());
addFaceData.add("card", cardId);
addFaceData.add("mf_selector", "biggest");
headers.setContentType(MediaType.MULTIPART_FORM_DA TA);
HttpEntity<MultiValueMap<String, Object>> addFaceRequest = new HttpEntity<>(addFaceData, headers);
ResponseEntity<?> addFaceResponse = new RestTemplate().exchange(
baseUrl + "/objects/faces/",
HttpMethod.POST,
addFaceRequest,
ResponseEntity.class
);
if (addFaceResponse.getStatusCode() != HttpStatus.OK) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_E RROR).body("Failed to add face");
}
System.out.println(cardId);
return ResponseEntity.status(HttpStatus.CREATED).body(car dId);
}