I'm wondering if it's possible to use ajax to upload an image to a flask server in request.files by typing in the url through a form. Here is my current form setup:
<form method=post enctype=multipart/form-data runat="server" id="capture_form">
<div class="form-group">
<label for=facesURL>URL:</label>
<input type="text" name="image_url" class="form-control" id=facesURL placeholder="URL of image">
<input type="submit" value="Preview URL image" id="submit">
</div>
<button align="center" class="btn btn-info upload-image" id=upload-image type=submit value="Upload Image">Upload File</button>
At the moment, the preview URL image button displays the image from the url into an , however I'm stuck at actually grabbing that src and uploading it on click of the upload image button. Any help is appreciated.