Im trying to add an image uploader on my website. I have a javascript with jcrop (the scrip is not mine, I used the one I found on the Internet); this script takes image file from computer crops it and passes to php. It starts with converting the form output to javascrip file.
var oFile = $('#image_file')[0].files[0];
This is a key line for the script, everything else is derived from oFile. I want to make it avaliable for users to upload pictures by adding a weblink (i already made possible saving image files on the localhost be posting a link); How can I open the image from my localhost with javascript and put it in the same format as oFile variable in the line above, so that my script can work with it?