Hello, I’m currently in the process of building an application that utilises the Netlify API (Node.js) in order to help users create and deploy sites. One issue I’m facing at the moment is finding a way to ignore the ‘images’ folder in the user’s website directory so it is not being monitored during deployment.
What I want to achieve is keep uploading images to the ‘images’ directory of the Netlify site, however once they are uploaded to Netlify and the site is deployed, I want to be able to delete the image files from my local storage. Currently, If I do that, the next time an update is made and the site is re-deployed, the API detects that the ‘images’ folder is now empty and deletes all the images on the Netlify site.
Is there a way to detach the ‘images’ folder so I can manually control it’s deployment? What would be an ideal solution is if every time the ‘images’ folder contains files in it, to deploy them, but when the ‘images’ folder is empty to ignore it and not delete the images on the Netlify site.
I tried experimenting with the netlify.toml file however I wasn’t able to find a solution.