Skip to content

Commit

Permalink
Merge pull request #6569 from breakponchito/FISH-7212-avoid-creation-…
Browse files Browse the repository at this point in the history
…of-mime-temporal-files

FISH-7212: avoiding creation of temporal files on local system
  • Loading branch information
breakponchito committed Feb 22, 2024
2 parents 64f009e + b8baa9c commit 04c8eb5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
//Portions Copyright [2022] [Payara Foundation and/or its affiliates]
//Portions Copyright [2022-2024] [Payara Foundation and/or its affiliates]
package com.sun.enterprise.admin.remote.reader;

import com.sun.enterprise.admin.remote.ParamsWithPayload;
Expand Down Expand Up @@ -94,7 +94,9 @@ public ParamsWithPayload readFrom(final InputStream is, final String contentType
if (!StringUtils.ok(boundary)) {
throw new IOException("ContentType does not define boundary");
}
final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, new MIMEConfig());
MIMEConfig mimeConfig = new MIMEConfig();
mimeConfig.setMemoryThreshold(-1L);
final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, mimeConfig);
//Parse
for (MIMEPart mimePart : mimeMessage.getAttachments()) {
String cd = getFirst(mimePart.getHeader("Content-Disposition"));
Expand Down

0 comments on commit 04c8eb5

Please sign in to comment.