Skip to content

Commit

Permalink
Update sts-form.html
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu authored Mar 21, 2018
1 parent f881cbc commit c592a41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/sts-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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 @@ -104,4 +104,4 @@ <h1>Form 表单简单上传(兼容 IE8)</h1>
</script>

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

0 comments on commit c592a41

Please sign in to comment.