Innovator.Client icon indicating copy to clipboard operation
Innovator.Client copied to clipboard

Unable to vault file to Innovator v12

Open alaxala opened this issue 6 years ago • 3 comments

This code works with Innovator v11sp12, but not with v12

UploadCommand uCommand = connection.CreateUploadCommand(); uCommand.AddFile(arasFileItem.Id(), arasFileItem.LocalFile); connection.Apply(uCommand).AssertNoError();

With Innovator v12 I've got the exception with response 404 from Innovator inside it.

alaxala avatar Jul 24 '19 13:07 alaxala

I think the problem is that TransactionalUploadCommand.Commit calls the inherited from UploadComand UploadAndApply. But this procedure uses the protocol and soap actions for previous versions of innovator. If I comment out lines from 41 through 45 in TransactionalUploadComand.cs, i.e.

//if (_transactionId == null && !Files.Any(f => f.UploadPromise != null)) //{ // _lastPromise = UploadAndApply(async) //} //else I can vault the file to Innovator v12. Of course, this is not the solution, but I do not have enough knowledge about Innovator , and especially about Innovator.Client source to offer more.

alaxala avatar Jul 26 '19 19:07 alaxala

I'll have to do some more testing with that. In the meantime, if you use uCommand.UploadFile (instead of uCommand.AddFile), it definitely should work as I have been using that with a v12 instance.

erdomke avatar Jul 27 '19 13:07 erdomke

ArasLogin.zip Hello, I met a similar issue with innovator.client version 2020.2.23.1756, against Aras 12 SP9. I followed the cookbook paragraph "Upload a file to the vault" and got the exception "Innovator.Client.HttpException: NotFound". The workaround is to use the method UploadFile but I was not able to do it in one step. I had to do it in 2 steps: 1. vault a file, 2. create a relationship Document File to the File. The code is uploaded. Please is there a better way how to do it?

jrmleziva avatar Feb 11 '21 18:02 jrmleziva