Guest User

Untitled

a guest
Apr 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. // Attache the PDF.
  2. def f = request.getFile('invoiceFile')
  3. if(!f.empty) {
  4. newOrder.invoiceFile = "${generator.nextInt(1000000)}.pdf"
  5. f.transferTo(new File(servletContext.getAttribute("InvoicesFolder") + newOrder.invoiceFile))
  6. } else {
  7. newOrder.invoiceFile = null
  8. }
Add Comment
Please, Sign In to add comment