**文書の過去の版を表示しています。**
20210218
大容量ファイルの先頭を送信
index.pug
h1 #{title} p this is #{title} p Upload your fasta file below form(action="./upload" method="POST" enctype="multipart/form-data") input(type="file", name="file" id="inputfile") button(type="button" onclick="file_upload()" value="Upload") p(id="text") //script(src="./javascripts/main.js") script. var slice_size = 100 * 1024 * 1024; var files; var file; var slice_file; var reader = new FileReader(); var content; var fileData = {}; function file_upload() { var slice_file = $("#inputfile")[0].files[0].slice(0,slice_size); reader.readAsText(slice_file); reader.onload = function() { content = reader.result; } fileData.fileContent = content; $.ajax({ type: "POST", url: "./upload/", data: fileData, dataType: "json", }) .done(function(res){ console.log("success"); }) .fail(function(res){ console.log("falied"); }); }