Advice on best way to approach uploading pdf's from file server to our api

Hi , i'd like to build a bulk uploader for our business

the files are currently on a windows file server

they are clearly identified.

Our api will only import them as attachments if they are in a base64 format

so i'm probably looking at importing them all to database from the file server

storing which account they belong to

then call the api and going through the files in the db 1 by 1 , waiting for a success message and then moving on to the next one.

any tips or advice would be great.