Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16001

Don't load attachments in memory when sending mails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 11.0
    • 10.11
    • Mail
    • Unknown
    • N/A
    • N/A

    Description

      Right now we do:

                  temporaryAttachmentFile =
                      new TemporaryFile(File.createTempFile("attachment", ".tmp", this.temporaryDirectory));
                  fos = new FileOutputStream(temporaryAttachmentFile);
                  fos.write(attachment.getContent());
      

      The call to getContent() loads the attachment content in memory which is not good since it means requiring more memory than needed.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: