How to upload a JS file in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2019 12:41 AM
Hi,
We have a UI page that creates the front-end for one of our applications. The javascript part (built using Angular 7) is currently stored in a UI script and is included in the UI page by using <script> tag. So far so good.
But now as the application grows with more features, the size of the JS file is also getting bigger. Now the UI script can't hold the complete contents of the JS file. We're stuck there. I can upload the JS file to an external CDN and just import in the UI page using the script tag in the same way, but we don't want to upload the file outside of ServiceNow.
My question is, is there a way to upload the JS file within ServiceNow, and then use that file as CDN in the UI page? I looked at the solution, i.e. to use "Upload file" option in ServiceNow given here at External JS Plugins - Size too big for UI Script but that doesn't work, because the upload file feature looks like it's to upload an XML file and import the contents to ServiceNow from the xml file.
Does anyone know how I can solve this? Thanks in advance for your response.
Regards,
Bala

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2019 02:07 AM
Have you tried to upload that filed . what kind of error it is showing .
you can try to import that file dont worry about size initially.
let me know the error type.