pdfbox3 upgrade and fix

This commit is contained in:
Anthony Stirling
2024-01-12 23:15:27 +00:00
parent 77dcf04cfe
commit 5281d7a49a
33 changed files with 131 additions and 91 deletions

View File

@@ -19,6 +19,14 @@ import org.springframework.web.multipart.MultipartFile;
public class GeneralUtils {
public static File convertMultipartFileToFile(MultipartFile multipartFile) throws IOException {
File tempFile = File.createTempFile("temp", null);
try (FileOutputStream os = new FileOutputStream(tempFile)) {
os.write(multipartFile.getBytes());
}
return tempFile;
}
public static void deleteDirectory(Path path) throws IOException {
Files.walkFileTree(
path,