diff --git a/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java b/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java index 103680b94c9..d07a7b2fdec 100644 --- a/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java +++ b/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java @@ -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; @@ -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"));