Is upload of lib folder still needed when deploying web-part (SharePoint integration)?

Product: WebViewer/BIM

Product Version:

Please give a brief summary of your issue:
First of all I want to understand if it is still needed to upload the folder for each site when you are deploying the web part/ extension and so on or I can leave it inside the web part project, just bundle it and it will work.

I mean this steps:
3. In the Document Library of your SharePoint site, create a “Webviewer” folder and create another child folder “js” inside the “Webviewer” folder.
4. Upload the lib folder extracted from the WebViewer.zip to the js folder.
The webviewer lib folder should now be available from the url: https://.sharepoint.com/sites//Shared Documents/Webviewer/js/lib.

Second question is if I want to deploy web part for example how can I make it easily usable on different tenants and sites without using .env file ? Cause I’m not completely understand how to make it.

1 Like

Thank you for posting your question to our forum. We will provide you with an update as soon as possible.

1 Like

Hello, for how long do I need wait for a respond ? Thanks for the answer !

1 Like

Hello Skygus,

We apologize for the delay. We are still currently investigating your issue. Thank you for your patience.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Hello Skygus,

Bundling the project with the lib folder inside should be sufficient.

If you are bundling it in an app and not including the lib folder the files, then
https://.sharepoint.com/sites//Shared Documents/Webviewer/js/lib
aka the domain that is hosting WebViewer wont have the files.

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

As alternative can I place it in azure to make it accessible for multiple site collections?

1 Like

Hello Skygus,

Yes, that works as well.
You can find more information regarding remote lib here: Apryse Documentation | Documentation

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Also wanted to clarify what is a correct way, to provide config.js file ? Cause for now I receive problem that viewer is on a different domain when make it through azure cdn, and it gives me suggestion to create config.js and put code in there. I tried to put it as a separate blob in my azure storage, but after I provide config field to Webviewer class, after “then” “instance” is undefined

1 Like

Hello Skygus,

Since you have the path option specified on another domain, you will need to edit the lib/ui/configorigin.txt file to whitelist your app’s domain(s).
See this link for more info: Apryse Documentation | Documentation

It is also worth noting that we encourage config files to first be added within the project files and passed in as a relative URL, relative to the HTML file.

1 Like

@jromanocarlsen Also wanted to clarify another moment. Here you mention the possibility to separate lib and store only core in some cdn for example, but ui will still be on the same domen as iframe. How can I make this possible ? Cause it is not valid to pass the full url in uiPath parameter. The app will make a calls in such format:
https://myblob.blob.core.windows.net/webviewer-library/lib/https://mytenant.sharepoint.com/sites/MySite/PDFTronAssets/WebViewer/js/lib/ui