error handling, excel, bug fixes, name fixes (#57)

This commit is contained in:
Anthony Stirling
2023-02-24 22:47:26 +00:00
committed by GitHub
parent 6135d08154
commit 67345d083e
27 changed files with 558 additions and 45 deletions

View File

@@ -43,7 +43,7 @@ public class ConvertImgPDFController {
byte[] bytes = PdfUtils.convertToPdf(file.getInputStream());
logger.info("File {} successfully converted to pdf", file.getOriginalFilename());
return PdfUtils.bytesToWebResponse(bytes, file.getName() + "_coverted.pdf");
return PdfUtils.bytesToWebResponse(bytes, file.getOriginalFilename().replaceFirst("[.][^.]+$", "")+ "_coverted.pdf");
}
@PostMapping("/pdf-to-img")