Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Incorrect warning on oversize file attachment

SA-58577

Summary



Error message generates from JBoss when uploading an attachment. The attachment size is greater than 5 MB.
This occurs after upgrading from Pega 6.3 SP with Websphere or DB2 to Pega 7.3 with JBoss or Oracle. The file size limit for attachment is set to 5 MB on the DSS settings. However, there is no file size limitation set in the JBoss server.



Error Messages

Error message from JBoss:

JBWEB000065: HTTP Status 413 - User attempted to upload a file larger than 4 MB. Please contact the System Administrator.
JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message User attempted to upload a file larger than 4 MB. Please contact the System Administrator.
JBWEB000069: description JBWEB000133: The request entity is larger than the server is willing or able to process.


Error message in Pega logs:

(web.impl.WebStandardImpl) ERROR - 127.0.0.1: Encountered error while processing request: com.pega.pegarules.priv.web.HTTPOperationException: 413: User attempted to upload a file larger than 4 MB. Please contact the System Administrator.


Steps to Reproduce

  1. Configure a button to launch OOTB flow action, AttachAFile
  2. Set DSS (Initialization/MaximumFileUploadSizeMB) to limit upload file size to 5 MB as maximum attachment size limit.
  3. Upload attachment > 5 MB in the application.


Root Cause



A defect in Pegasystems’ code or rules.

Resolution



Perform the following local-change: 

Use the below code in userworkform to configure the maximum size of a file upload. 


<script> 
var maxfilesizePermitted = 3; 
var errorMessageforMaxSizeExceeded = "You have exceeded max allowed size of 3 MB"; 
$(document).ready(function(){ 
$("#modalOverlay").on('change', '[id = "$PpyAttachmentPage$ppxAttachName"]', function() { 
var that = this; 
var maxfilesizePermittedinBytes = maxfilesizePermitted * 1024*1024; 
if(that && that.files){ 
for(var i = 0 ; i < that.files.length; i++){ 
if(that.files[i].size >= maxfilesizePermittedinBytes){ 
alert(errorMessageforMaxSizeExceeded); 
$(this).val(""); 



}); 
}); 
</script>

 

Published July 23, 2018 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice