How to upload the file to File Net using NodeJS? - node.js

I have a requirement to upload the image pdf file/files to IBM File Net using Express.JS! How to do it?
I'm a new bee for File Net, even I'm not able to find sufficient docs for the same.
Any help will much be appreciated.

You are out of look as FileNet does not come with suitable APIs out-of-the box.
tl;dr: You have the following options:
Develop a custom service
Install and use the optional CMIS API
Install and use the optional GraphQL API (only if you are on FileNet version >= 5.5.4)
You may ask if installing and configuring the IBM ECM CMIS for Enterprise Content Management would be an option. That would allow you to use CmisJS.
With FileNet 5.5.4 they introduced an optional Content Services GraphQL API
As an alternative, you or somebody else with FileNet experience needs to develop a custom REST/Web-Service for uploading files.

Related

Nodjs API development -Best practice of versioning the API

I need to develop an API using NodeJS.But I am not an expert in the nodejs. For the versioning of the API, I found one method where we should keep 2 folders for V1 and V2 versions. Is this the best practise to follow for my API development. Please suggest the best approach? and also suggest the project structure.
Thanks in advance
You should keep the API version as a variable that is configurable (ex. in .env file). You can then version your API by adding the version to the path of your root endpoint (ex. /my-api/v1/api-resource). And when a new version of the API is developed just change the version to v2.
I think that solution of two different directories is not good, because you would have to copy code around and it can quickly mess things up. If you want to have different versions of the API separated you should use some type of version control and develop your v1 on a separate branch (ex. v1) and when the development of that version is complete just create a new branch for the new version (ex. v2).
You should also look into REST as the architectural style of your API: https://restfulapi.net/
I have also created a template for the development of backend systems in Node.js that is based on REST architecture, so you can check out the directory structure and architecture of Node.js projects.

How to change Microsoft.Azure.CognitiveServices.FormRecognizer v0.8.0-preview API endpoint to v.2.0.0?

I'm currently training a custom model (manual labeling) using the OCR labeling tool
I noticed the model was stored on the https:///formrecognizer/v2.0-preview/custom/models endpoint.
The Form Recognizer .NET SDK (Microsoft.Azure.CognitiveServices.FormRecognizer v0.8.0-preview) are currently directed to the v1.0.0-endpoint because the model id is not available when I executed a GET request to https:///formrecognizer/v2.0-preview/custom/models and It did exists on https:///formrecognizer/v1.0-preview/custom/models. Does anybody know how to fix this problem without having to implement the REST API manually all over again or waiting for the next version of nuget package to come out?
Any help would be appreciated!
You can check out this website for the code snippets of how to use the v2.0 REST API:
aka.ms/Form-aka.ms/Form-Recognizer/api
The current SDK only supports v1.0 release, but the SDK for v2.0 release is coming soon. Stay tuned.
The new Azure SDK Azure.AI.FormRecognizer preview library supporting Form Recognizer service version 2.0-preview is now available. Details on how to use it can be found in the package README.

Whats the lowest NodeJs version is required to use Google Drive API V3?

I have been told to use NodeJs V4.9.1/NPM 2.5.11 to develop the server side API's and should use google drive/sheet API's for file upload and validating the user's file. Does NodeJs V4.9.1 should support the Google Drive V3 and Google Sheets API V4 ?
The Google drive and google sheets apis are rest apis that means that they are accessed using HTTP calls.
Any programming language or version of a programming language that can make a HTTP Post, HTTP Get, and possibly patch. will be able to use these apis.
I suspect that who ever told you that was refering to the version of node required for running the Google apis nodejs clinet library I have been unable to find any information on what the minimum version of node required to run that library is.
I have added an issue asking them to clarify that issues 1348
If you use the http/REST API directly, then it's your code so you can write to any version of node. If you intend to use Google's JavaScript client library, that requires node >= 6, so will not run on node 4.9.

How to use CouchDB in Sails.js

I want to create a web in node js with the using the "Sails.js" framework and "CouchDB" database. I have check its package and I found lots of package for that.
https://www.npmjs.com/search?q=couchdb
So any one can suggest which package I can used for my application and also want to know for this I need to create a custom adapter.
If there has no requirement of create a custom adapter, so can I use the sails module feature.
The most popular CouchDB adapter in JS :
PouchDB
nanoDB
They are both available on NPM.
PouchDB has a lot of features and his API is easy to use. It also supports a lot of return types (callbacks,promises, async/await). There's also a lot of plugins around PouchDB.
As for nanoDB, it has less features(since it`s minimalist) but it covers all the general features of CouchDB.
Note: nanoDB normal implementation is with callbacks(which can be very ugly). There is an implementation of nanoDB with promises here.
You can take a look also to this adapter sails-couchdb-orm, but it could be no longer maintained. If you plan deploying your project using IBM Bluemix, you should try using sails-cloudant-orm. Cloudant is based on Apache CouchDB.

Servicestack - run built-in clients on the .net client profile framework

Is it possible to run servicestack's built-in clients on the .net client profile framework?
When i change the target framework property in the project settings to ".Net Framework Client Profile" and try to compile i get the following message: the namespace ServiceClient does not exist in the namespace servicestack.
We use servicestack services to send exception reports. We use the JsonServiceClient and feel really comfortable with it. We could change the target framework - but then we have to check all installations for the availability of the full .net framework.
Any idea how to solve this?
Thanks.
From the package contents of the latest ServiceStack.Common package there seems to be no -client version included (See Common Framework and Profile Targeting Examples under NuGet - Creating and Publishing a Package).
You should either change the target framework the full profile or pull the code from ServiceStack's GitHub Repo and try to build it for client profile yourself. The downside of this is that you will loose Nuget's awesome update features...
You could off course file an issue at GitHub for the guys maintaining ServiceStack to add a client profile version of the framework, but I guess that there's a good reason for why it's not there already.

Resources