How can I convert a base64 string to an image and save it? I have a server and a web app. What I want to achieve is that from the web app, the user will send a POST request with a base64 string. The server will then convert the base64 string to an image and save it inside a folder.
See attached B4A project: 1. It takes an image (png or jpg) and convert it into a byte array 2. The byte array is converted into a Base64 String 3. The String is then converted into a QR Code (bitmap) 4. Use the QR Code bitmap and decodes it into a string (Base64) 5. Convert the Base64 string...
See attached B4A project: 1. It takes an image (png or jpg) and convert it into a byte array 2. The byte array is converted into a Base64 String 3. The String is then converted into a QR Code (bitmap) 4. Use the QR Code bitmap and decodes it into a string (Base64) 5. Convert the Base64 string...
Dim su As StringUtils
Dim b() As Byte = su.DecodeBase64(b64string)
File.WriteBytes(File.Combine(File.DirApp, "www/assets/images/"), $"filename.png"$, b)
dim filename as string = req.getparameter("filename")
Dim su As StringUtils
Dim b() As Byte = su.DecodeBase64(b64string)
File.WriteBytes(File.Combine(File.DirApp, "www/assets/images/"), $"${filename}.png"$, b)