MID Server Script includes calling issue

siramdasu
Mega Contributor

While doing the external database integration, I can send attachment <5mb, but when I try to send >5mb file via mid server the base64 conversion not happened. Am trying to call MID server script includes which consists script of base64 conversion from normal script includes, its not getting called. I used the below syntax to call

var probe = new global.JavascriptProbe('MID_Server_Name');

probe.setName('RandomName');

probe.setJavascript('var Obj = new MidServerScriptIncludesName(); Obj.fileUpload();');

but am unable to access that mid server script includes, so the base64 conversion   not done, in the external database it's going as empty file.

7 REPLIES 7

venkatiyer1
Giga Guru

The 5mb size limitation may be limited because internally it could be calling this method getContentBase64 which is limited to 5 MB


https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_SGSA-getContentBase64_GR



You might want to either pass it as base stream and then try encoding from global app or you can may be send the stream in batches. Alternatively you can reach out to Hi.



Last time i worked on such an issue, i wrote a probe script include on the mid server which i called from a Javascript probe and within that probe, i wrote all the Java functions to encode, if need be in limited stream size batches.


Yeah I have written the same probe script, but am unable to call in my script includes, can you provide your syntax what you worked for that?


venkatiyer1
Giga Guru