Upload a file to a model in a cron job

I’m actually stuck at the very same problem.
How should I pass the files parameter to the initial code snippet?
The file that I wish to upload is located on a server folder and I’m able to access it, however I’m for some reason unable to understand how should I pass it to this function - similarly as in your initial example fs.readFileSync('config/something/mynew.pdf')
or simply as a path?