jquery - Attach Image to the input of type file using javascript -
I want users to take a photo or upload photos from the webcam. If he chooses to take a picture, he should load it into the uploaded file. I do not even know that this is all possible. I am open to suggestions.
// I have an image & lt; Img id = "photo" & gt; // I'm getting this from the webcam // and I have the input of type file upload & lt; Input type = "file" name = "uploadedFile" id = "uploadedFile" accept = "image / *" & gt; // File should now go to upload this image data in the file. Is this possible?
This is not possible.
You can either encode the data in the form of text (such as base 64) and store it in hidden input, or you send it to the server using XMLHttpRequest object instead of sending it to the form You can.
Comments
Post a Comment