<?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 Using JS api to import filesystem permissions : JS File API ? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302861#M255991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to import a filesystem's permissions into alfresco, so it fits my current configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To do that, i'm planning to use the javascript API. To do this, I want to get access to my filesystem using the File API implemented in javascript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thing is, it doesn't seem to be implemented ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;!–break–&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the base I use to check if it could work on alfresco : &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;// Check for the various File API support.&lt;BR /&gt;if (window.File &amp;amp;&amp;amp; window.FileReader &amp;amp;&amp;amp; window.FileList &amp;amp;&amp;amp; window.Blob) {&lt;BR /&gt;&amp;nbsp; // Great success! All the File APIs are supported.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert("OK!");&lt;BR /&gt;} else {&lt;BR /&gt;&amp;nbsp; alert('The File APIs are not fully supported in this browser.');&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This turns me that error : &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;org.alfresco.error.AlfrescoRuntimeException: 01181160 Error during command servlet processing: 01181159 Failed to execute script 'workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9': 01181158 ReferenceError: "window" n'est pas défini (workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9#3)&lt;BR /&gt;causé par :&lt;BR /&gt;org.alfresco.scripts.ScriptException: 01181159 Failed to execute script 'workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9': 01181158 ReferenceError: "window" n'est pas défini (workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9#3)&lt;BR /&gt;causé par :&lt;BR /&gt;org.alfresco.error.AlfrescoRuntimeException: 01181158 ReferenceError: "window" n'est pas défini (workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9#3)&lt;BR /&gt;causé par :&lt;BR /&gt;org.mozilla.javascript.EcmaError: ReferenceError: "window" n'est pas défini (workspace://SpacesStore/b08ea900-d60c-48b1-bd62-a240a2a2c4e9#3)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's french, but the main error in english would be : "ReferenceError : "window" is not defined".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sooo… what ? I think i'm missing something, but it seems like the script has to get through some alfresco's compilation or something, so it doesn't successfully brings up the "window" object that is supposed to be managed by the web browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I right ? Is there any workaround ? Should I drop javascript and try something else ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Feb 2014 14:10:04 GMT</pubDate>
    <dc:creator>ermantis</dc:creator>
    <dc:date>2014-02-18T14:10:04Z</dc:date>
    <item>
      <title>Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302861#M255991</link>
      <description>Hello everyone,I'm trying to import a filesystem's permissions into alfresco, so it fits my current configuration.To do that, i'm planning to use the javascript API. To do this, I want to get access to my filesystem using the File API implemented in javascript.Thing is, it doesn't seem to be impleme</description>
      <pubDate>Tue, 18 Feb 2014 14:10:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302861#M255991</guid>
      <dc:creator>ermantis</dc:creator>
      <dc:date>2014-02-18T14:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302862#M255992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If its server side alfresco java script then there is no browser or window.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 14:53:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302862#M255992</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-02-18T14:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302863#M255993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I put the script in my Data Dictionnary / Scripts, and execute it via the URL, so… not sure, but I guess it is server side JS…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, how do i call my function ? How do I explore my FS ? Or how do I get access to FS permission ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 14:57:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302863#M255993</guid>
      <dc:creator>ermantis</dc:creator>
      <dc:date>2014-02-18T14:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302864#M255994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be a potential security hole if you could do what you are trying to do - so not its not possible with Java Script.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may like to look at the bulk file system import tool tool which uses the java API to import files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 15:12:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302864#M255994</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-02-18T15:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302865#M255995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't want to import files, I want to import their permissions, and Bulk FS doesn't manage to do that… Any other way to import permissions, then ? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 15:33:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302865#M255995</guid>
      <dc:creator>ermantis</dc:creator>
      <dc:date>2014-02-18T15:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using JS api to import filesystem permissions : JS File API ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302866#M255996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No.&amp;nbsp;&amp;nbsp;&amp;nbsp; There's no way to "import" permissions.&amp;nbsp;&amp;nbsp; However there are various permissions APIs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I gave the example of the BFSIT since its an example of reading a filesystem and updating an alfresco repository.&amp;nbsp;&amp;nbsp;&amp;nbsp; Dealing with permissions is similar although you would need to work out how the access control maps bewtween a bare filesystem and alfresco.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 16:07:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-js-api-to-import-filesystem-permissions-js-file-api/m-p/302866#M255996</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-02-18T16:07:35Z</dc:date>
    </item>
  </channel>
</rss>

