Dynamic File Upload - Is this possible?

Dynamic File Upload - Is this possible?

Hi,

I am attempting to customize a shopify website that sells custom mugs/cups.

A user can customize their mug by choosing various preset options and text input fields.

When they have completed the customization there is a button for them to generate a preview of the mug.

The problem I am trying to solve is that at the moment the image doesn't get submitted to the cart.

So, I have added a file input object to the form. But it currently has the "Upload File" button.

Instead of allowing the user to upload an image by browsing their computer is it possible to take the image of their customized cup/mug and put it in the image selector?

Any help would be very much appreciated!

Trev