Clear all

[Solved] How to read files uploded using FileManager in Pipeline?


Topic starter

How to read files in the script node when uploaded using File Manager in Pipeline?

1 Answer
Topic starter

The python script below will read the uploaded files. A simple breakdown of the script is below:

  1. Create a Path, with the uploaded file name i.e. :
    uploaded file name: abc.json
    file path = './abc.json'
  2. open the file for read
def executeNode(inputs):
  outputs = {}
  # file uploaded to file manager by name 'abc.json'
  upload_file = './abc.json'
  # open file for read
  with open(upload_file) as f:
    lines = f.readlines()

  return outputs


This post was modified 4 weeks ago by Parmod Singh Rana
© 2020 One Network Enterprises. All rights reserved. Privacy Policy