Commit 1d6473cc authored by flothoni's avatar flothoni Committed by Vidjil Team

database.js: Provide download link and automatically click on it

parent f10448b2
......@@ -134,9 +134,20 @@ Database.prototype = {
'config_id': self.m.db_key.config,
'grep_reads': window},
function(a) {
openAndFillNewTab("Your reads are ready. <a href='"+DB_ADDRESS+"/results_file/download?filename=seq/clone.fa-1&results_file_id="+a.result_id+"'>Download them</a>");
// Link to result file and launch download
var path_data = DB_ADDRESS+"/results_file/download?filename=seq/clone.fa-1&results_file_id="+a.result_id
var file_name = "reads__"+clone_id+"__file_id_"+"_"+sequence_file_id+".fa"
var anchor = document.createElement('a');
anchor.setAttribute("download", file_name);
anchor.setAttribute("href", path_data); = 'display: none';
* request a side process to the server
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment