沙箱环境支持下载

1.x tag-1.x
tanghc 5 years ago
parent 6d8eaf72f3
commit 143237aeaf
  1. 11
      sop-website/website-front/pages/sandbox/sandbox.js

@ -227,9 +227,16 @@ function postFile(data, formData) {
function downloadFile(data) {
$('.dl-form').remove();
var url = SopConfig.url + '/sandbox/test';
var form = $('<form class="dl-form"></form>').attr("action", url).attr("method", "post");
var form = $('<form></form>')
.addClass('dl-form')
.attr("action", url)
.attr("method", "post");
for(var key in data) {
form.append($("<input>").attr("type", "hidden").attr("name", key).attr("value", data[key]));
form.append($("<input>")
.attr("type", "hidden")
.attr("name", key)
.attr("value", data[key]));
}
form.appendTo('body').submit();
}

Loading…
Cancel
Save