Large media and Node.js file system

Hello I have a quick question, I have a site using netlify large media to handle my image files. In the site I want to get the total number of images in the folder and display them. I am trying to do that via a Node function

   const paths = ['/assets/images/action'] 
 fs.readdir(path, function (err, content) {
name = path.split('/').pop(); 
results[name] = content.length;
}

That isn’t the entire function I’m just omitting the rest for brevity. The issue is no matter what path configuration I use ‘assets/images’ ‘src/assets/images’ ‘./assets/images’ Node returns telling me the file path doesn’t exist. My question is what is the large media file structure and how can I access the folders my images are stored in?

my netlify site is https://keen-colden-282a59.netlify.app/

hey @tskulley, we haven’t forgotten about you, but the person who knows most about NLM is out this week. We will get back to you as soon as we can.

I appreciate it but I actually found an older Netlify community post that answered the question for me

I actually just added a Fauna database and stored the information I needed there.

Thank you for the response.

1 Like

fantastic. glad it helped!