how to convert base64 string image to blob in android? -


I have a base 64 string image. I want to convert it to blob type and save it to the database .. I have

  string base64Image = "iVBORw0KGgoAAAANSUhEUgAAAGAAAACgCAYAAADzcGmMAAAACSV ...";  

This is what I have tried.

  byte [] byteImage = org.apache.commons.codec.binary.Base64.decodeBase64 (befImage. GetBytes ()); Json.put ("during_unloading_photo", byte image);  

Where JSON is the name of my JSONObject and during_unloading_photo column which is the Blob type. To save Blob in

Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -