Skip to main content

Import netcdf files into Trackvia using either a node.js API-Node-SDK or a microservice

Comments

1 comment

  • Leeana Ramos
    Jacob Hartmann commented  ·  April 27, 2022 9:36 AM

    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

    0

Please sign in to leave a comment.

Powered by Zendesk