OR
convert the image to a CYPTO64 string using code like this :
Code:
local tbImg = Dialog.FileBrowse(true, "Locate File Picture", _DesktopFolder, "Pictures (.png, .jpg, .tif)|*.png;*.jpg;*.tif|", "", "dat", false, false); if tbImg and tbImg[1] ~= "CANCEL" then local ext=String.SplitPath(tbImg[1]).Extension; local newName= Input.GetText("Input_Model")..""..ext File.Copy(tbImg[1], _TempFolder.."\\"..newName, true, true, false, true, nil); error = Application.GetLastError(); if (error ~= 0) then Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION); end local crypT64 = Crypto.Base64EncodeToString( _TempFolder.."\\"..newName, 0);--We convert the file into binary Input.SetText("Input_Picture",newName); Input.SetText("Input_Crypto64", crypT64); Image.Load("Load", _TempFolder.."\\"..newName); Image.SetVisible("Load", true); else --User Cancelled or did not select an image so we use default image local tbImg= _SourceFolder.."\\AutoPlay\\Images\\placeholder.jpg" local ext=String.SplitPath(tbImg).Extension; local newName= "Default"..ext File.Copy(tbImg, _TempFolder.."\\"..newName, true, true, false, true, nil); error = Application.GetLastError(); if (error ~= 0) then Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION); end local crypT64 = Crypto.Base64EncodeToString( _TempFolder.."\\"..newName, 0);--We convert the file into binary Input.SetText("Input_Picture",newName); Input.SetText("Input_Crypto64", crypT64); Image.Load("Load", _TempFolder.."\\"..newName); Image.SetVisible("Load", true); end
If you are using SQLITE3 the do a search -
here is an example by Ulrich https://forums.indigorose.com/forum/...ith-blob-field
Cheers
Leave a comment: