Skip to content

Commit 5b6940f

Browse files
committed
fix: fix filename truncate bug in addFile API
1 parent 5534081 commit 5b6940f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/src/backend/TreeFileBackend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import * as Setting from "../Setting";
1717
export function addFile(storeId, key, isLeaf, filename, file) {
1818
const formData = new FormData();
1919
formData.append("file", file);
20-
return fetch(`${Setting.ServerUrl}/api/add-tree-file?store=${storeId}&key=${key}&isLeaf=${isLeaf ? 1 : 0}&filename=${filename}`, {
20+
return fetch(`${Setting.ServerUrl}/api/add-tree-file?store=${storeId}&key=${key}&isLeaf=${isLeaf ? 1 : 0}&filename=${encodeURIComponent(filename)}`, {
2121
method: "POST",
2222
credentials: "include",
2323
headers: {

0 commit comments

Comments
 (0)