Skip to content

Commit c592a41

Browse files
authored
Update sts-form.html
1 parent f881cbc commit c592a41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo/sts-form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h1>Form 表单简单上传(兼容 IE8)</h1>
9191
document.getElementById('msg').innerText = '未选择上传文件';
9292
return;
9393
}
94-
Key = filePath.match(/[\\\/]?([^\\\/]+)$/)[1];
94+
Key = 'dir/' + filePath.match(/[\\\/]?([^\\\/]+)$/)[1]; // 这里指定上传路径
9595
getAuthorization({Method: 'POST', Key: '/'}, function (err, auth) {
9696
// 在当前目录下放一个空的 empty.html 以便让接口上传完成跳转回来
9797
document.getElementById('success_action_redirect').value = location.href.substr(0, location.href.lastIndexOf('/') + 1) + 'empty.html';
@@ -104,4 +104,4 @@ <h1>Form 表单简单上传(兼容 IE8)</h1>
104104
</script>
105105

106106
</body>
107-
</html>
107+
</html>

0 commit comments

Comments
 (0)