Essentially, this the similar to a dataset upload where the origin is from a
web page when a user clicks on a HTML button. The button is not part of the
tool framework but any number of possible
I am writing a variety of data editors in JavaScript and it would be convenient
to upload the dataset into the user's current history list.
of JavaScript actions.
I think I should be able to use the regular upload1 (upload.py) machinery. But
So far, I have not had success in tricking it with my JavaScript function. I
know that I could add web api. But there is a lot hairy code in the history
dataset association that looks like it will change. So I'd rather keep it
simple.
Does anyone have any suggestions?
Thanks,
Ted
function UploadToHistory(name, value) {
var
payload = { tool_id: "upload1",
'file_type': 'tabular',
'file_name', name,
'dbkey': '?',
'files_0|url_paste': value};
$.ajax( {
async: false,
type: "POST",
url: "/tool_runner/index",
data: payload,
dataType: "json",
success: function(array_obj, status) { console.log("success",
array_obj, status); },
failure: function() {console.log("fail");}
} );
}
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client. To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
http://lists.bx.psu.edu/