Skip to content

Commit aec4a5a

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

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/services/OrgAssetsService.ts

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

0 commit comments

Comments
 (0)