Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Increase size limit of attachment on Service Portal

S_53
Kilo Guru

How can I increase the size the limit of an attachment per file for a service request on service portal. I think it is allowing up to 24MB per file. No error or warning message is shown. I tried updating below things but no luck. Any thoughts? 

  • Updated widget: "sp-ticket-attachments" from 1024*1024*24 to 1024*1024*1024. Din't work.

find_real_file.png

 

  • System property - com.glide.attachment.max_size shows 1024 but no luck.

find_real_file.png

1 ACCEPTED SOLUTION

S_53
Kilo Guru

Was able to achieve it.

Most of the articles say 'SP Ticket Attachments' but the correct widget to update 1024*1024*1024 is 'SP Catalog Item'.

 

View solution in original post

4 REPLIES 4

Priyanka Chandr
Mega Guru

Hi,

In the form widget client controller script Update the line sizeLimit variable

From var sizeLimit = 1024 * 1024 * 24; // 24MB

To var sizeLimit = 1024 * 1024 * 1024; // 1GB

Kindly mark it correct and helpful.

Thanks,

Priyanka

Jaspal Singh
Mega Patron
Mega Patron

Article that you have read & made changes states the same. I am not sure if modifying at all other places on the portal i.e. all widgets where limit is set as 24 would make it work.

Gowrisankar Sat
Tera Guru

I think your code should work as per below KBs:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0692617

https://hi.service-now.com/kb_view.do?sysparm_article=KB0718101

Also i checked multiple OOB widgets which has the same code:

function setupAttachmentHandler(){
$scope.attachmentHandler = new nowAttachmentHandler(appendSuccess, appendError);

$timeout(function() {
var sizeLimit = 1024 * 1024 * 24; // 24MB
$scope.attachmentHandler.setParams($scope.data.table, $scope.data.f._attachmentGUID, sizeLimit);
})
}
setupAttachmentHandler();

S_53
Kilo Guru

Was able to achieve it.

Most of the articles say 'SP Ticket Attachments' but the correct widget to update 1024*1024*1024 is 'SP Catalog Item'.