File Upload issue

We are trying to get the base64 of an image we have uploaded by trying to get it from skuid.$M(“model”).data[0].Body.realBlobValue.asByteArray. With some images it works but with others the value is not there with the only field after skuid.$M(“model”).data[0].Body.realBlobValue being .file and it returns a value that looks like a filepath ": “/tmp/bvf/blob2885374293920319543.bvf”. We would just like a little background on where to go or what to do so that we can consistently grab the base64 of the image that is uploaded

Pablo has the answer:

A little adjustment, It seems that depending of the filetype the body object is different. so for HTML files the base64 is not in .realBlobValue.asByteArray is in .asByteArray

var field = arguments[0];var value = arguments[1];
var Base64content;
var contenttype=field.row.ContentType;
var show="<iframe src="“data:”+contenttype+";base64,"+Base64content+""">";
var iframe = $( ‘

See the full thread here: