Is it safe to have cloud name and preset in front end code? Upload question
I have made an app with the MERN stack. I am using the url endpoint to allow users to upload images to my cloudinary, and then the data from that gets put into a mongodb database which I pull information from. I have the cloud name and preset in my .env file, but .env variables get put into the build folder anyway so it doesn't really make a difference.
To try to remedy this, I tried using the SDK in my backend (nodejs). I installed the cloudinary npm package and configured it, but it gives me the error "ENEONT: No such file or directory" and then it shows the path to my server's folder on my computer.
I don't understand how the upload is supposed to work if it looks for the file in my server folder.
I haven't been able to figure out how to make it work, so I guess I have to use the URL endpoint like I've been doing. That leads me to my question, "is it a good idea to have my cloud name and preset right there in my code?".
I would assume no, since anyone could just use the endpoint to remove all of the images on my cloudinary lol.