Upload file from sftp to upload folder and use it on strapi admin

Hi! i’m new to strapi and with an issue related with this topic.

I’m building CSV files with exported data and I place them into /upload folder with the next line:

fs.writeFileSync(rootDir + ‘/public/uploads/’ + fileName + ‘.csv’, csvContent);

According to your suggestion, my pending task is to use a watcher to build the code to write on the DB but can’t find any documentation about it.
Can you please provide more info to do that?

Thank you so much.