how to upload image using code?

Hello all,
a found this page which has a code to upload images

the problem is i dont know how to use this code , could some one instruct me step by step?
and after that i want to have a submit button to submit this photo and other details like sender name to a database?

i manage to make the button work like below :

so how to save the image link in my database ?

i noticed that when i press submit button it upload the image again ,how to get around this?

your help is much appreciated.

thanks

Hi!

Can you share/explain how did you used the mentioned code?
Note that uploading alone is not enough and that the image has to be saved/inserted into a collection in order to be stored.
Use these articles to find your solution:

In case you’re using dataset:

Hope it helps!
Best of luck.

Doron. :slight_smile:

Thank you for the reply , currently im using the user input upload file, as this does not require code to work.

but i want to work with code make some customization, and this code is a bit complicated for me , if some one guide me some steps…that will be great …
many thanks.