Skip to main content
3-Newcomer
July 13, 2020
Question

Base64 to Blob

  • July 13, 2020
  • 1 reply
  • 1033 views

I have a base64 encoded file that I am trying to save into a mssql database with a field type of varbinary(max). 

For the life of me, I cannot figure out the correct JavaScript code for my ThingWorx service to convert this base64 data into binary for the database thing to insert the record. Also, do I use a blob input datatype for this field for the database service?

1 reply

5-Regular Member
July 14, 2020

The only Binary related API in TWX snippet is: LoadBinary, PostBinary, PutBinary, if you want to convert to binary, try public JS services.