03-22-2017 03:50 AM
Hi,
I try to use angular-nuxeo to attach a blob, but I get excute exception.
Here is my code :
documentUploader(uid: string, file : File): IPromise<Object> {
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) => {
defer.resolve(resp);
},
(error) => {
defer.reject(error);
} );
return defer.promise;
}
How to instanciate the Uploader and then attached the blob?
Thanks for help
03-23-2017 02:28 AM
If you are in an Angular (1.x) application, you should register the client as an Angular service:
...
.service('nuxeo', function() {
return new Nuxeo({
baseURL: 'http://localhost:8080/nuxeo/',
auth: {
method: 'basic',
username: 'Administrator',
password: 'Administrator'
}
});
})
And then, you can inject nuxeo
in your controllers to use the client, such as other Angular services you may already use.
03-24-2017 06:50 AM
Here is a sample of my code
03-28-2017 11:02 PM
Hi Thomas,
Do you have something for me about "put your application URL behind the Authentication filter" for using angular with nuxeo on jasig CAS nuxeo server?
A sample or example.
Thanks
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.