SatheeshKumar
Kilo Sage

can you try 

StringUtil.base64DecodeAsBytes(binaryfile);

if the above doesn't helped try to use the below.

var eccGr = new GlideRecord('ecc_queue');
eccGr.initialize();
eccGr.setValue('agent', 'AttachmentCreator');
eccGr.setValue('topic', 'AttachmentCreator');
eccGr.setValue('name', fileName+':'+contentType);// modify 
eccGr.setValue('source', tableName+':'+tableSysId);// modify
eccGr.setValue('payload', binaryfile);
var sys_id = eccGr.insert();

-satheesh