Good moring or afternoon sir. Today, I'm sharing you how to convert [File to MultiPartFile] in JAVA. Trust Me! This is the code I'm actually using in my system :) 1. You can use CommonsMultipartFile An example of a filePath is shown below. ex) C:/Users/han/test.xlsx File yourFile = new File(filePath); DiskFileItem fileItem = new DiskFileItem("file", Files.probeContentType(yourFile.toPath()), fal..
JAVA Converting File to MultiPartFile
Good moring or afternoon sir. Today, I'm sharing you how to convert [File to MultiPartFile] in JAVA. Trust Me! This is the code I'm actually using in my system :) 1. You can use CommonsMultipartFile An example of a filePath is shown below. ex) C:/Users/han/test.xlsx File yourFile = new File(filePath); DiskFileItem fileItem = new DiskFileItem("file", Files.probeContentType(yourFile.toPath()), fal..
2023.02.10