3
I’m new to the Nodejs and Git world, I’m trying to develop from a system where users upload images.
Every time I do deploy from the app, users pictures are deleted from folder public/uploads/
How should I proceed so that people’s files are not deleted in this case? I tried using . gitignore in uploads folder, but it didn’t help.
I thought of hosting the images on a server separate from the server where the app is, but only if there is no other way.
I need a way to keep the folder public/uploads/ without being changed when making any deploy.
Note: The site is in Nodejs. The deploy is done using Git on the Openshift server.
Are you recording the images inside your application directory? Of course, if you deploy them they will disappear because you are overwriting. To solve, try using a directory outside your application, for example:
/var/uploads
, etc....– Wakim
OK, solved! In Openshift, there is a space for file storage /app-root/data/ . You can access it via sftp by Filezilla. http://stackoverflow.com/questions/23150714/upload-file-on-openshift Valeu, Wakim; Caputo!
– Roberto
This information is very interesting. It could include an answer and accept it, so that others who come through this question know this solution.
– Wakim
Did you find a solution? Poste as an answer to help other people.
– Maniero