Skip to content

Commit

Permalink
Web: Common: Api: Added encoding for string folderId
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaoleshko committed Nov 9, 2021
1 parent 51fec4f commit 677f7d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/asc-web-common/api/files/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export function getFolderPath(folderId) {
}

export function getFolder(folderId, filter) {
if (folderId && typeof folderId === "string") {
folderId = encodeURIComponent(folderId.replace(/\\\\/g, "\\"));
}

const params =
filter && filter instanceof FilesFilter
? `${folderId}?${filter.toApiUrlParams()}`
Expand Down

0 comments on commit 677f7d7

Please sign in to comment.