Upload Image using Code

Yes so your issues is what I noted above. Your insert is happening before the file is uploaded so you don’t have a URL to upload.