Hi All,
Can anybody suggest me. How to convert base64 into bytes[] in servoy web client.
Pass after conversion to DB for saving that bytes[] as into SQL Datatype Image.
Is there any Plugin available for it. Please suggest
Thanks in Advance.
Packages.org.apache.commons.codec.binary.Base64.decodeBase64(string);
juan.cristobo wrote:Also, you can use this:
- Code: Select all
Packages.org.apache.commons.codec.binary.Base64.decodeBase64(string);
/**
* @private
*
* @param {String} encodedStr
*
* @return {Array<byte>}
*
* @properties={typeid:24,uuid:"B94FC7D2-63AC-4CAB-9A14-26F400C06842"}
*/
function base64DecodeAsBytes(encodedStr) {
var b64 = new Packages.org.apache.commons.codec.binary.Base64();
/** @type {Array<byte>} */
var bytes = b64.decode(encodedStr);
return bytes;
}
Users browsing this forum: No registered users and 0 guests