Accessing local files when using Pipedream CLI

I have deployed a script to Pipedream and got the job running using Pipedream CLI. I have come across the problem that my Java script has to read and write to local files, for instance:

logs = require(__dirname + '/MyLog.json');

When run locally in node everything is fine but when running it through pipedream I get this error:

Error: Cannot find module '/var/task/MyLogs.json'

How is this situation fixed? Should I upload the files to the platform and change the script dirname? Can I point to my local file system somehow? At some point I may need to work with sizeable files and this could be an issue, I suppose.

Thanks

Hi @pablogonzalez01280,

I would recommend to use Pipedream tmp dir to store your local file. Would you mind taking a look?