Since my previous question wasn't answered, let me put it in a different way.
I would like someone to provide a functional example on how to programatically add a file to plupload queue, ready for uploading.
Perhaps something like this:
$('#uploader').on("ready", function() {
uploader.addFile("c:\\file.jpg");
});
This code isn't working, though.
Thanks.
EDIT: Following Elijah Lynn's answer, I edited my code example to load a file from the server, not from the client.
$('#uploader').on("ready", function() {
uploader.addFile("server_path/file.jpg");
});
I just attempted to do this and I don't think it is possible to do this. The reason being security. Imagine if you created a script like you suggest with a link to a picture and just loaded it on 100,000 clients. One of those clients might just have a link to that photo and off it would go to your website! And you wouldn't have needed their permission.
That being said, there is an addFile() method that Plupload provides but it needs a File object and getting that File object programatically is the forbidden part. The core issue is getting the File reference in order to then get the File object.