I have researched this endlessly but cannot find exactly what I am after, so hopefully, I can get some advice here. I am pretty new to coding and learning by doing, so please forgive any errors in the request.
I have built a Leaflet map using various libraries where the user draws a polygon on over an area and they have the option to save the map.
The map all works and currently the user can either download the map or it saves as a screenshot by creating a new image container in the body of the page.
There is a form that the user completes with some supplementary information that is then sent to me. My problem is I do not want the user to have to download the file and then reupload it as a file to the form.
I would like to basically put the screenshot into the form and that gets sent to me and/or it gets saved automatically to a folder on the backend somewhere. I am stuck with how to put an image into a form without the need to upload it. Therefore if I can work out how to save the image to a folder that would be perfect.
I am by no means expecting someone to do my project for me, but if someone could point me in the correct direction to start that would be great. If any more info is required or snippets of code I can add if required.