<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to upload a JS file in ServiceNow? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540281#M197207</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;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 &amp;lt;script&amp;gt; tag. So far so good.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=b8c90be5db5cdbc01dcaf3231f9619eb" target="_blank" rel="noopener noreferrer nofollow"&gt;External JS Plugins - Size too big for UI Script&lt;/A&gt;&amp;nbsp;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.&lt;/P&gt;
&lt;P&gt;Does anyone know how I can solve this? Thanks in advance for your response.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Bala&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2019 07:41:42 GMT</pubDate>
    <dc:creator>bala_sn</dc:creator>
    <dc:date>2019-05-08T07:41:42Z</dc:date>
    <item>
      <title>How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540281#M197207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;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 &amp;lt;script&amp;gt; tag. So far so good.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=b8c90be5db5cdbc01dcaf3231f9619eb" target="_blank" rel="noopener noreferrer nofollow"&gt;External JS Plugins - Size too big for UI Script&lt;/A&gt;&amp;nbsp;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.&lt;/P&gt;
&lt;P&gt;Does anyone know how I can solve this? Thanks in advance for your response.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Bala&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 07:41:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540281#M197207</guid>
      <dc:creator>bala_sn</dc:creator>
      <dc:date>2019-05-08T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540282#M197208</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below links may help you&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=88448b29dbd8dbc01dcaf3231f96195b" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=88448b29dbd8dbc01dcaf3231f96195b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=187ac3e9db5cdbc01dcaf3231f961985" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=187ac3e9db5cdbc01dcaf3231f961985&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=73ae32a5db58dbc01dcaf3231f961987" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=73ae32a5db58dbc01dcaf3231f961987&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=6062c7eddb98dbc01dcaf3231f961980" rel="nofollow"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=6062c7eddb98dbc01dcaf3231f961980&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make this answer is correct if answer your question&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;Chandu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 07:46:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540282#M197208</guid>
      <dc:creator>Chandu Telu</dc:creator>
      <dc:date>2019-05-08T07:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540283#M197209</link>
      <description>&lt;P&gt;Chandu,&lt;/P&gt;
&lt;P&gt;Thanks for the response. These posts talk mainly about how to use external libraries from CDN as URL or as an UI Script in ServiceNow.&lt;/P&gt;
&lt;P&gt;My question is basically, how to upload the same library in ServiceNow (instead of external CDN) and get the URL, so that I can use that in my UI page.&lt;/P&gt;
&lt;P&gt;One of the example URLs given in one of those posts is "scripts/libs/selectize.min.js" which is an OOB js file. How can I upload my own js file to the scripts/libs folder and use it?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Bala&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 08:32:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540283#M197209</guid>
      <dc:creator>bala_sn</dc:creator>
      <dc:date>2019-05-08T08:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540284#M197210</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;For this Query: How can I upload my own js file to the scripts/libs folder and use it?&lt;/P&gt;
&lt;P&gt;you can refer this below link it will helps you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;https://community.servicenow.com/community?id=community_blog&amp;amp;sys_id=0e6c2ea1dbd0dbc01dcaf3231f9619f2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sanjay&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 08:46:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540284#M197210</guid>
      <dc:creator>Sanjay Bagri1</dc:creator>
      <dc:date>2019-05-08T08:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540285#M197211</link>
      <description>&lt;P&gt;Sanjay,&lt;/P&gt;
&lt;P&gt;This is how we currently use the javascript file, i.e. compile angular code into one big js file, copy that js to a UI script and include that UI script in the UI page using script tag.&lt;/P&gt;
&lt;P&gt;The problem now is, the size of the js file is too big and it's not possible to store the contents of the js file in the UI script anymore. That's why I'm looking for a solution that would help me upload the file to ServiceNow, get an URL, and use that URL in the UI page to include the js.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Bala&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 08:56:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540285#M197211</guid>
      <dc:creator>bala_sn</dc:creator>
      <dc:date>2019-05-08T08:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload a JS file in ServiceNow?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540286#M197212</link>
      <description>&lt;P&gt;Have you tried to upload that filed . what kind of error it is showing .&lt;/P&gt;
&lt;P&gt;you can try to import that file dont worry about size initially.&lt;/P&gt;
&lt;P&gt;let me know the error type.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 09:07:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-upload-a-js-file-in-servicenow/m-p/1540286#M197212</guid>
      <dc:creator>Sanjay Bagri1</dc:creator>
      <dc:date>2019-05-08T09:07:34Z</dc:date>
    </item>
  </channel>
</rss>

