I am testing my apps in OpenShift and I used the laravel framework. I created a folder named uploads in the public directory. I can upload images files in this public/upload folder. The problem is when I git push changes on my local computer to the remote files, all uploaded files are removed. I have searched about making a symbolic link in .openshift/action_hooks/deploy. I am using the code below but it seems it is not working to retain the uploaded files
echo ".............pre_build............creating symlinks................."
if [ ! -d "$OPENSHIFT_DATA_DIR/public/uploads" ]; then
mkdir $OPENSHIFT_DATA_DIR/public/uploads
echo directory made.
fi
ln -sf $OPENSHIFT_DATA_DIR/public/uploads $OPENSHIFT_REPO_DIR/public/uploads
echo ".................creating symlinks completed........................"