In the Create new post section of the page create.php the user has two options:
1) Upload an image using a input[type="file" from its pc.
2) Select an image attached to a meme generator plugin that retrieves the finished canvas image this way....canvas.toDataUrl()
PROBLEM
In the second option, Once the meme is finished, I want to attach it to the input file of the first option to upload it along with the post.
How should I do that?
HTML
<textarea id="comment"></textarea>
<input type="file" id="imgtoUpload" />
<canvas id="meme"></canvas>
JS
canvas.toDataUrl();// meme to attach