working picture upload and mongodb connection