jaraiza Active Member Licensed User Longtime User Dec 11, 2014 #1 Hi! In B4A there is an excellent library (Base64Image) that allows me to send a photo data to my WebService and save the file to my Web Hosting. In B4i this library doesn't exist. Is there any option to convert a file into Base64? Thanks!!
Hi! In B4A there is an excellent library (Base64Image) that allows me to send a photo data to my WebService and save the file to my Web Hosting. In B4i this library doesn't exist. Is there any option to convert a file into Base64? Thanks!!
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2014 #2 Yes. B4X: Sub FileToBase64 (Dir As String, FileName As String) As String Dim su As StringUtils Return su.EncodeBase64(Bit.InputStreamToBytes(File.OpenInput(Dir, FileName))) End Sub Upvote 0
Yes. B4X: Sub FileToBase64 (Dir As String, FileName As String) As String Dim su As StringUtils Return su.EncodeBase64(Bit.InputStreamToBytes(File.OpenInput(Dir, FileName))) End Sub