Is there a workaround for using GlideSysAttachment().getContent() for file size is bigger than 5MB ?

kozy_f
Tera Expert

According to the Docs, GlideSysAttachment().getContent() is limited to read 5MB.
Is there are workaround for files that is bigger than 5MB ?
GlideSysAttachment | ServiceNow Developers

1 REPLY 1

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @kozy_f 

There is a size limit in place for prcessing attachments to manage memory on your instance. The only way around this would be to increase the out of the box max size of 5MB, but this can cause memory issues and could potentially cause the instance to run out of memory. Changing this limitation would NOT be supported by ServiceNow if this caused any performance repercussions. That being said, you could increase the max size limit as follows...

 

 

 

1. System Properties -> All Properties

 

 

2. Click "New" to create a new system property "com.glide.attachment.max_get_size" and enter value in bytes (for example 7000000 for 7MB).

 

 

3. Save


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy