Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Attache the PDF.
- def f = request.getFile('invoiceFile')
- if(!f.empty) {
- newOrder.invoiceFile = "${generator.nextInt(1000000)}.pdf"
- f.transferTo(new File(servletContext.getAttribute("InvoicesFolder") + newOrder.invoiceFile))
- } else {
- newOrder.invoiceFile = null
- }
Add Comment
Please, Sign In to add comment