Spring Framework Version:5.3.22 Spring Boot Version:2.7.3

import org.springframework.http.codec.multipart.FilePart;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.io.File;

@RestController
public class TestController {

    @PostMapping("test")
    public Mono<R> test(FilePart file){
        String fileName = file.filename();
        File newFile = new File("F:/images/banner/",fileName);
        file.transferTo(newFile);
        return Mono.just(R.ok());
    }
}

i upload an jpg and use transferTo method to write file to the path.but i can't found the picture in the F:/images/banner/

Comment From: snicoll

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use the issue tracker only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.