I'm working on a program to automate uploading a file to a website. I'd like it to take some image file from the user, and then upload it to a specific website by clicking a Choose File
button, selecting the file from disk, then pressing select. The HTML for the button looks like this:
<form action="/api" method="POST" enctype="multipart/form-data" target="_blank">
<fieldset>
<div>
FILE: <input id="file" type="file" name="file">
</div>
</fieldset>
</form>
I'm very new to web programming, but from my understanding this sort of thing can be done with requests. How would I go about it?