Question

FileApiService not working in Local Creatio instance

Hi Community,

I have restored a cloud instance, locally. In Cloud the functionality (FileApiService) works.

The problem I am facing is that I can not upload files in the Attachments object (ex AccountFile) in the local instance.

 

Console

Console Response is in the attached file

File attachments
Like 0

Like

2 comments
Best reply

Good day,

 

Is it possible that the cloud instance was set up to upload the files to an S3 storage?

Please try changing the ActiveFileContentStorage setting to the database and compiling the system.



After that please try uploading the file again.

Thank you.

I will re-upload the Console Response , because the text file can not be opened.

{
    "errorInfo": {
        "errorCode": "NullReferenceException",
        "message": "Object reference not set to an instance of an object.",
        "stackTrace": "   at Terrasoft.Core.AppConnection.get_S3ConnectionParameters()\r\n   at Terrasoft.File.S3.Settings.S3ConnectionSettingsProvider..ctor(AppConnection appConnection)\r\n   at DynamicInjectord7776e6fbfbf47f3aaef1f7b3f02b5c5(Object[] )\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Terrasoft.Core.Factories.ClassFactory.<>c__DisplayClass16_0.<Get>b__0()\r\n   at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)\r\n   at Terrasoft.File.StorageInstanceFactory.CreateContentStorage(FileMetadata fileMetadata)\r\n   at Terrasoft.File.File`2.<InvokeOnContentStorage>d__32.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Terrasoft.File.File`2.<WriteAsync>d__45.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Terrasoft.Common.Threading.AsyncPump.Run(Func`1 asyncMethod)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.Upload(IFileUploadConfig fileUploadConfig)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.UploadFile(IFileUploadConfig fileUploadInfoConfig)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.UploadFile(IFileUploadInfo fileUploadInfo, Boolean isSetCustomColumns)\r\n   at Terrasoft.Configuration.FileApiService.UploadFile(Stream fileContent)"
    },
    "success": false,
    "nextPrcElReady": false,
    "queryId": null,
    "responseStatus": {
        "ErrorCode": "NullReferenceException",
        "Message": "Object reference not set to an instance of an object.",
        "StackTrace": "   at Terrasoft.Core.AppConnection.get_S3ConnectionParameters()\r\n   at Terrasoft.File.S3.Settings.S3ConnectionSettingsProvider..ctor(AppConnection appConnection)\r\n   at DynamicInjectord7776e6fbfbf47f3aaef1f7b3f02b5c5(Object[] )\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)\r\n   at Ninject.Activation.Context.ResolveInternal(Object scope)\r\n   at Ninject.Activation.Context.Resolve()\r\n   at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings)\r\n   at Terrasoft.Core.Factories.ClassFactory.<>c__DisplayClass16_0.<Get>b__0()\r\n   at Terrasoft.Core.Factories.ClassFactory.GetInstance[T](Func`1 action)\r\n   at Terrasoft.File.StorageInstanceFactory.CreateContentStorage(FileMetadata fileMetadata)\r\n   at Terrasoft.File.File`2.<InvokeOnContentStorage>d__32.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Terrasoft.File.File`2.<WriteAsync>d__45.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Terrasoft.Common.Threading.AsyncPump.Run(Func`1 asyncMethod)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.Upload(IFileUploadConfig fileUploadConfig)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.UploadFile(IFileUploadConfig fileUploadInfoConfig)\r\n   at Terrasoft.Configuration.FileUpload.FileUploader.UploadFile(IFileUploadInfo fileUploadInfo, Boolean isSetCustomColumns)\r\n   at Terrasoft.Configuration.FileApiService.UploadFile(Stream fileContent)",
        "Errors": null,
        "Meta": null
    },
    "rowsAffected": -1
}

 

Good day,

 

Is it possible that the cloud instance was set up to upload the files to an S3 storage?

Please try changing the ActiveFileContentStorage setting to the database and compiling the system.



After that please try uploading the file again.

Thank you.

Show all comments