Has anyone increased com.glide.attachment.max_get_size?

cloudyrobert
Kilo Guru

With a goal of using GlideSysAttachment for integrations that support a reasonably sized attachment for 2019, I've looked at com.glide.attachment.max_get_size. Setting this property above 5 MB increases the default limitation of the getContentBase64 function.

I'm hesitant to do this, though, because of the language on the two pages linked below and the broad system impact. It doesn't just affect the size limitation of this API call, and it gives ServiceNow an easy out in the event of a performance degradation or outage.

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

https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/form-administrati...

Has anyone done it? What value did you use? Has it had any negative impact?

2 REPLIES 2

Ellis Richmond
Giga Contributor

I've personally run into this issue myself in the past. I solved it with GlideScriptableInputStream and GlideTextReader.

This is the video that helped me.

 

Hi Ellis,

I am looking to send the attachment over REST API and just wanted to know how would I use glideScriptableInputStream object to do this.

I am working on a scoped app and is having challenges in sending files over 5mb .

var current = new GlideRecord('sys_attachment');

if (current.get('4bde0359db67901079b5e5f1ca961970')) {

var attachment = new GlideSysAttachment();
var contStream = attachment.getContentStream(current.getUniqueValue());
gs.info('Stream :' +contStream);

/*
** how would I write this into the request body & have the third party application
** use the request body to decode the attached file.
*/

}

Thx

Dj.