How do I import netcdf files into Trackvia using either a node.js API-Node-SDK or a microservice
Zachary Wontrop shared this idea · Apr 22, 2022
How do I import netcdf files into Trackvia using either a node.js API-Node-SDK or a microservice
Zachary Wontrop shared this idea · Apr 22, 2022
Comments
1 comment
Hello Zachary,
In TrackVia's Node SDK, you can use the "attachFile" function to upload a file from your local filesystem into a record's document field. Please see the following link for valid arguments for this function: https://www.npmjs.com/package/trackvia-api#attachfileviewid-recordid-fieldname-filepath
A general example of usage would be:
var TrackviaAPI = require('trackvia-api'); // if installed through npm
var api = new TrackviaAPI('YOUR KEY HERE', 'ACCESS TOKEN HERE', 'HOST', 'ACCOUNT ID');
api.attachFile(105, 1500, "NetCDF File Field", "/tmp/myData.nc");
Keep in mind that the above code will overwrite any existing file in the "NetCDF File Field" for record ID 1500 in view ID 105.
I hope this helps; if I can provide any further assistance, please do not hesitate to reach out. Have a great day!
Sincerely,
Jacob Hartmann, President
Hartmann Industries, LLC.
TrackVia Gold Partner
Please sign in to leave a comment.