Upload Image using Code

With code requests I advise to add snippets of your current attempt so we can assist in debugging.

How are you attempting to do it?

I would check out this reference for using the upload button in code,