Site functionality :
- Site has a button if and when a user clicks the button - the site would pop a native dialogue / file explorer
- Select a file to upload, in this case a .jpeg.
- Click "open" button from the dialogue
- Photo is uploaded.
Tried the Native dialogue and upload APIs but I cant seem to get it working.
Here's a snippet of the HTML, "choose file button"
<input accept="image/*" data-drupal-selector="edit-hero-image-0-upload" type="file" id="edit-hero-image-0-upload" name="files[hero_image_0]" size="22" class="js-form-file form-file">