<?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>topic Re: Alfresco Error alfresco.fileupload is not a constructor. in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135703#M36474</link>
    <description>&lt;P&gt;Hi! We need more technical details: could you please share with us your code? In adittion it could help to have the log error paste it here.&lt;/P&gt;&lt;P&gt;With these details we can figure out what is happening.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Cris.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Apr 2021 13:44:51 GMT</pubDate>
    <dc:creator>cristinamr</dc:creator>
    <dc:date>2021-04-07T13:44:51Z</dc:date>
    <item>
      <title>Alfresco Error alfresco.fileupload is not a constructor.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135702#M36473</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey! I am a beginner Alfresco programmer. I have a problem with Alfresco.FileUpload (). On one page this method works, but on the other it gives the error alfresco.fileupload is not a constructor. Tried connecting to components / upload / file-upload.js page but it was unsuccessful.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 10:26:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135702#M36473</guid>
      <dc:creator>doroga7</dc:creator>
      <dc:date>2021-04-07T10:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Error alfresco.fileupload is not a constructor.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135703#M36474</link>
      <description>&lt;P&gt;Hi! We need more technical details: could you please share with us your code? In adittion it could help to have the log error paste it here.&lt;/P&gt;&lt;P&gt;With these details we can figure out what is happening.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Cris.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 13:44:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135703#M36474</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-04-07T13:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco Error alfresco.fileupload is not a constructor.</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135704#M36475</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;SPAN&gt;Cris!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To fix the error, I initialized the javascript directly on the pagen the page -&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;alfresco-config&amp;gt;
   &amp;lt;config&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;dependencies&amp;gt;
                &amp;lt;js src="/components/upload/file-upload.js"/&amp;gt;
            &amp;lt;/dependencies&amp;gt;
        &amp;lt;/forms&amp;gt;
    &amp;lt;/config&amp;gt;
&amp;lt;/alfresco-config&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;This helped fix the error, but another appeared -&amp;gt; "No instance of uploader type 'Alfresco.DNDUpload' exists."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I as before initialized js on the page -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;alfresco-config&amp;gt;
    &amp;lt;config&amp;gt;
        &amp;lt;forms&amp;gt;
            &amp;lt;dependencies&amp;gt;
                &amp;lt;js src="/components/upload/dnd-upload.js"/&amp;gt;
                &amp;lt;js src="/components/upload/file-upload.js"/&amp;gt;
            &amp;lt;/dependencies&amp;gt;
        &amp;lt;/forms&amp;gt;
    &amp;lt;/config&amp;gt;
&amp;lt;/alfresco-config&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Didn't help this time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Delving into error -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 928px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1023iF0E713E76F369143/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The "ComponentManager" is initialized here. This is where the component we need is pushed. -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;Alfresco.util.ComponentManager = function()
{
   var components = [];
   return (
   {
      &lt;STRONG&gt;register: function CM_register(p_oComponent)&lt;/STRONG&gt;
      {
         if (p_oComponent.id !== "null" &amp;amp;&amp;amp; components.hasOwnProperty(p_oComponent.id))
         {
            var purge = components[p_oComponent.id];
            if (purge.name === p_oComponent.name)
            {
               if (typeof purge.destroy  === "function")
               {
                  purge.destroy();
               }
               this.unregister(components[p_oComponent.id]);
            }
         }
         components.push(p_oComponent);
         components[p_oComponent.id] = p_oComponent;
      },
      unregister: function CM_unregister(p_oComponent)
      {
         for (var i = 0; i &amp;lt; components.length; i++) // Do not optimize
         {
            if (components[i] == p_oComponent)
            {
               components.splice(i, 1);
               delete components[p_oComponent.id];
               break;
            }
         }
      },

      reregister: function CM_reregister(p_oComponent)
      {
         this.unregister(p_oComponent);
         this.register(p_oComponent);
      },

      &lt;STRONG&gt;find: function CM_find(p_oParams)&lt;/STRONG&gt;
      {
         var found = [];
         var bMatch, component;

         for (var i = 0, j = components.length; i &amp;lt; j; i++)
         {
            component = components[i];
            bMatch = true;
            for (var key in p_oParams)
            {
               if (p_oParams[key] != component[key])
               {
                  bMatch = false;
               }
            }
            if (bMatch)
            {
               found.push(component);
            }
         }
         return found;
      },

      &lt;STRONG&gt;findFirst: function CM_findFirst(p_sName)&lt;/STRONG&gt;
      {
         var found = Alfresco.util.ComponentManager.find(
               {
                  name: p_sName
               });

         return (typeof found[0] == "object" ? found[0] : null);
      },

      get: function CM_get(p_sId)
      {
         return (components[p_sId] || null);
      },

      list: function CM_list()
      {
         return components;
      }
   });&lt;BR /&gt;...&lt;BR /&gt;...
}();&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But when loading this page, the component we need is not there -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_3.png" style="width: 416px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1021i9D257F8D1BE6E24D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_4.png" style="width: 416px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1022i3129E7D56E565CD3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I draw your attention that this component is not on this page (Alfresco.DNDUpload) -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_5.png" style="width: 829px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1025i67C98381B7D7A123/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And on this page everything is fine (there are no above errors) -&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_6.png" style="width: 851px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1024i3AF97BFFE7BAE355/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp;&lt;SPAN&gt;sorry for my bad english.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 09:41:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-error-alfresco-fileupload-is-not-a-constructor/m-p/135704#M36475</guid>
      <dc:creator>doroga7</dc:creator>
      <dc:date>2021-04-08T09:41:28Z</dc:date>
    </item>
  </channel>
</rss>

