There are several scenarios where ui-upload can be used.
Direct upload by clicking on a link or button:
Click here to upload an image
Open "Select File" dialog from script and then upload the selected file automatically,
or handle it and upload it manually.
See the following demo:
Load an image