WebClient API Upload Files

The WebClient API is nice for helping out in automation. For example you can use the RunScript command in selenium create entities with a line like follows: mx.data.create({ entity: "MyFirstModule.foo", callback: function(obj) { obj.set("bar", "1234"); obj.set("baz", "1234"); obj.set("qux", "1234"); mx.data.commit({ mxobj : obj, callback : function() { console.log("Object committed"); }, error : function(e) { console.log("Error occurred attempting to commit: " + e); } }); }, error: function(e) { console.log("an error occured: " + e); } }); I would like to know what kind of javascript can I use to upload a file for example in the image upload widget. How can I create an entity inheriting from System.Image and then upload the image file from javascript? Thankyou
0 answers