Skip to content

Commit

Permalink
Fix issue Stirling-Tools#2511: Fix broken ZIP issue by adding zipOut.…
Browse files Browse the repository at this point in the history
…finish()
  • Loading branch information
Abdurrahman-shaikh committed Feb 5, 2025
1 parent e382d25 commit 82c42d7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public ResponseEntity<byte[]> splitPdf(@ModelAttribute SplitPdfBySectionsRequest

if (sectionNum == horiz * verti) pageNum++;
}

zipOut.finish();
data = Files.readAllBytes(zipFile);
return WebResponseUtils.bytesToWebResponse(
data, filename + "_split.zip", MediaType.APPLICATION_OCTET_STREAM);
Expand Down

0 comments on commit 82c42d7

Please sign in to comment.