<?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: angular-nuxeo : attach a blob through uploader ? - [SOLVED] in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314918#M1919</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I though that there was a module in the nuxeo js library, to declare in the main app.js and use it globaly in the angular app.&lt;/P&gt;
&lt;P&gt;I go to follow your recommandation and create and simple .js service file and not a .ts file.&lt;/P&gt;
&lt;P&gt;Thanks a lot for your quick reply&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 09:34:00 GMT</pubDate>
    <dc:creator>freemann_</dc:creator>
    <dc:date>2017-03-23T09:34:00Z</dc:date>
    <item>
      <title>angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314913#M1914</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I try to use angular-nuxeo to attach a blob, but I get excute exception.&lt;/P&gt;
&lt;P&gt;Here is my code :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;documentUploader(uid: string, file : File): IPromise&amp;lt;Object&amp;gt; { 
	let defer = this.$q.defer(); 
	let options : any = {}; 
	options.operationId = 'Blob.Attach'; 
	options.client = this.nuxeo; 
	let myUploader : any; 
	myUploader = this.nuxeoClient.uploader.execute(options)
		.params({ 
			document: uid, 
			save : true, 
			xpath: "file:content" 
		}); 
	myUploader.uploadFile(file)
	.then((resp) =&amp;gt; {
		 defer.resolve(resp); 
	}, 
	(error) =&amp;gt; { 
		defer.reject(error); 
	} ); 
	return defer.promise;
}

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How to instanciate the Uploader and then attached the blob?&lt;/P&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:50:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314913#M1914</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-22T10:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314914#M1915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;First, you should use the last version of &lt;A href="https://github.com/nuxeo/nuxeo-js-client"&gt;nuxeo-js-client&lt;/A&gt; that works within an Angular application, angular-nuxeo is not needed anymore.
See the &lt;A href="https://github.com/nuxeo/nuxeo-js-client#angular-applications"&gt;Angular Applications&lt;/A&gt; section.&lt;/P&gt;
&lt;P&gt;Then, see the &lt;A href="https://github.com/nuxeo/nuxeo-js-client#batchupload"&gt;BatchUpload&lt;/A&gt; section, that contains a sample of exactly what you want to do "Attach an uploaded blob to a document".&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:59:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314914#M1915</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-22T10:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314915#M1916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;After done '&lt;STRONG&gt;bower install nuxeo --save'&lt;/STRONG&gt; , I tried to declare 'Nuxeo' as module in app.js but got error :&lt;/P&gt;
&lt;P&gt;Error: [$injector:nomod] Module 'Nuxeo' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.&lt;/P&gt;
&lt;P&gt;I declared in index.html ==&amp;gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo/dist/nuxeo.js
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:20:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314915#M1916</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-22T11:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314916#M1917</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;In the readMe you say :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;When added to your page, `Nuxeo` is available as a global variable.
var nuxeo = new Nuxeo({ ... });
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What do you mean by &lt;STRONG&gt;added to your page&lt;/STRONG&gt; , I don't see ? referencing it in app.js ?
I saw that there is no angular.module in the new library.&lt;/P&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 07:50:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314916#M1917</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-23T07:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314917#M1918</link>
      <description>&lt;P&gt;If you are in an Angular (1.x) application, you should register the client as an Angular service:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;...
.service('nuxeo', function() {
  return new Nuxeo({
    baseURL: 'http://localhost:8080/nuxeo/',
    auth: {
      method: 'basic',
      username: 'Administrator',
      password: 'Administrator'
    }
  });
})
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then, you can inject &lt;CODE&gt;nuxeo&lt;/CODE&gt; in your controllers to use the client, such as other Angular services you may already use.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2017 09:28:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314917#M1918</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-23T09:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314918#M1919</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I though that there was a module in the nuxeo js library, to declare in the main app.js and use it globaly in the angular app.&lt;/P&gt;
&lt;P&gt;I go to follow your recommandation and create and simple .js service file and not a .ts file.&lt;/P&gt;
&lt;P&gt;Thanks a lot for your quick reply&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 09:34:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314918#M1919</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-23T09:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314919#M1920</link>
      <description>&lt;P&gt;Hi Thomas, it works fine but I have a little problem.&lt;/P&gt;
&lt;P&gt;When I want to fetch documents, the nuxeo server requires automation user/pwd even if I use client.connect() in my code : here is an example  :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;//Ici on liste tous les documents du WS DOEJ
function ListerLesDocumentsNuxeo() { 
   var defer = $q.defer();    
   //On force la connection ??    
   nuxeoClientConnect().then(function (resp) {
        console.log('Connection ok ', resp.connected);        
       nuxeoClient.operation('Document.GetChildren')            
        .input(nuxeoPath)            
        .execute()            
    .then(function (docs) {                
         defer.resolve(docs);            
     }).catch(function (error) {                
         defer.reject(error);                
         throw error;            
     });    
   });    
return defer.promise;
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We use CAS on the nuxeo server so on client.connect(), we have this exception :
&lt;STRONG&gt;Fetch API cannot load &lt;A href="http://nuxeo.server/nuxeo/json/cmis" target="test_blank"&gt;http://nuxeo.server/nuxeo/json/cmis&lt;/A&gt;. The request was redirected to 'https://cas.server/cas/login?service=http%3A%2F%2Fnuxeo.server%2Fnuxeo%2Fnxstartup.faces', which is disallowed for cross-origin requests that require preflight.&lt;/STRONG&gt;
Thanks for Help&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 09:23:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314919#M1920</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-24T09:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314920#M1921</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;I think I found a little bug for Nuxeo.auth.
When instanciate like this, Nuxeo._auth is always &lt;STRONG&gt;undefined&lt;/STRONG&gt; :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;//Instanciation de l'Object Nuxeo de la librairie
	var nuxeoClient = new Nuxeo({
	    baseURL: nuxeoUri,    
	    apiPath: nuxeoApi,
            auth : {    
                 method: 'basic',    
                 username: nxUser,    
                 password: nxPwd
            },    
           //Activation du CORS    
          headers: defaultHeader
      });
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I force the Auth like this and then nuxeoClient.connect(), fetch documents successfuly ;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;/*Bug authentification ??
A voir Avec ToRoger de chez Nuxeo 
*/
function forcerLAuth() {
    nuxeoClient._auth =  authentication;
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Mar 2017 10:40:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314920#M1921</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-24T10:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314921#M1922</link>
      <description>&lt;P&gt;Registering a "nuxeo service" as below works correctly, and I can do fetch requests&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:23:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314921#M1922</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-24T13:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314922#M1923</link>
      <description>&lt;P&gt;So, it's not possible to use a variable directly for 'auth' ? it works fine for 'baseURL', 'apiPath' and 'headers'.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:28:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314922#M1923</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-24T13:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314923#M1924</link>
      <description>&lt;P&gt;You should deploy your Angular application on the Nuxeo Server, and put your application URL behind the Authentication filter so that the user will need to log in through CAS before accessing the app.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:40:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314923#M1924</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-24T13:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314924#M1925</link>
      <description>&lt;P&gt;Could you share your full code in a gist or something? I don't understand what you want to achieve.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:42:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314924#M1925</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-24T13:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314925#M1926</link>
      <description>&lt;P&gt;"put your application URL behind the Authentication filter", Can I have an example? Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:45:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314925#M1926</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-24T13:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314926#M1927</link>
      <description>&lt;P&gt;Here is a sample of my code&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:50:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314926#M1927</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-24T13:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314927#M1928</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;Do you have something for me about &lt;STRONG&gt;"put your application URL behind the Authentication filter"&lt;/STRONG&gt; for using angular with nuxeo on jasig CAS nuxeo server?&lt;/P&gt;
&lt;P&gt;A sample or example.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 06:02:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314927#M1928</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-29T06:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314928#M1929</link>
      <description>&lt;P&gt;You could have a look at those projects https&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:00:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314928#M1929</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2017-03-29T08:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: angular-nuxeo : attach a blob through uploader ? - [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314929#M1930</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:02:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/angular-nuxeo-attach-a-blob-through-uploader-solved/m-p/314929#M1930</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2017-03-29T08:02:35Z</dc:date>
    </item>
  </channel>
</rss>

