Skip to content

Commit

Permalink
Update simple-form.html
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu authored Mar 21, 2018
1 parent 4b251bb commit bcb7516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/simple-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h1>Form 表单简单上传(兼容 IE8)</h1>
document.getElementById('msg').innerText = '未选择上传文件';
return;
}
Key = filePath.match(/[\\\/]?([^\\\/]+)$/)[1];
Key = 'dir/' + filePath.match(/[\\\/]?([^\\\/]+)$/)[1]; // 这里指定上传路径
getAuthorization({Method: 'POST', Key: '/'}, function (err, auth) {
// 在当前目录下放一个空的 empty.html 以便让接口上传完成跳转回来
document.getElementById('success_action_redirect').value = location.href.substr(0, location.href.lastIndexOf('/') + 1) + 'empty.html';
Expand All @@ -96,4 +96,4 @@ <h1>Form 表单简单上传(兼容 IE8)</h1>
</script>

</body>
</html>
</html>

0 comments on commit bcb7516

Please sign in to comment.