Skip to content

Commit dd9b4c5

Browse files
author
Richard Gigan
committed
fix(FilePicker) : fix url endpoint for Organisation Assets
1 parent a079011 commit dd9b4c5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/services/OrgAssetsService.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ export class OrgAssetsService extends FileBrowserService {
1414
let filesQueryResult: FilesQueryResult = { items: [], nextHref: null };
1515
try {
1616
// Retrieve Lib path from folder path
17-
if (folderPath.charAt(0) !== "/") {
18-
folderPath = `/${folderPath}`;
19-
}
20-
// Remove all the rest of the folder path
21-
let libName = folderPath.replace(`${this._orgAssetsLibraryServerRelativeSiteUrl}/`, "");
22-
libName = libName.split("/")[0];
17+
let libName = folderPath;
18+
2319
// Buil absolute library URL
24-
const libFullUrl = this.buildAbsoluteUrl(`${this._orgAssetsLibraryServerRelativeSiteUrl}/${libName}`);
20+
const libFullUrl = this.buildAbsoluteUrl(`${this._orgAssetsLibraryServerRelativeSiteUrl}${libName}`);
2521

2622
let queryStringParams: string = "";
2723
// Do not pass FolderServerRelativeUrl as query parameter

0 commit comments

Comments
 (0)