Cannot overwrite avatar
This is something I experienced with the latest dev version (I have RocketChat opened in a browser as well as the App at the same time and use GridFS for storage):
- upload your avatar for the first time
- -> avatar gets synced to browser and app
- reload browser and app
- -> avatar stays (OK)
- upload a different avatar
- -> avatar gets synced to browser and app
- reload browser and app
- -> avatar is reverted to previous avatar (NOK)
- set avatar back to default
- -> avatar gets synced to browser and app
- reload browser and app
- -> avatar stays (OK)
- upload a different avatar
- -> avatar gets synced to browser and app
- reload browser and app
- -> avatar stays (OK)
So it seems that I cannot overwrite exisiting avatars without first picking the default one.
I have just tested this, and it seems to be working. A few things to be observed, though:
- Make sure that after you select and upload your file, you click on "Use uploaded file".
- Make sure you respect the rate-limit for changing avatars. If you don't, you'll probably get a message like this:

- Make sure you clear your browser cache before you refresh or you'll probably get your previous picture, as it will be in cache.
@marceloschmidt We'd be very happy if you'd ask us questions instead of closing the issue. We definitely have this issue. We're writing software on our own, so we at least know a tiny bit of what we're talking about. We definitely have the issue that we can't properly upload avatars. We tried deleting caches, we tried with the app, we checked the mongodb and stuff.
I made a video for you. Cache disabled, porn mode on. Here we go: http://www.vidup.de/v/Pp2Zn/
Please just tell me what other informations you need. I can also provide you with more videos or whatever you want.
Best Marc
Oh, sorry about that, then... I've tested it locally and it worked fine, so now I'll run a few more tests and see why it might have broken for you.
Thank you @marceloschmidt for investigating that further, we really appreciate that! :) We also saw that some users have the problem that their avatars get saved to the database with the "_id" "ObjectId(someHash)". The users which don't have the problem have the "_id" "firstName.lastName.jgp" for example. We are using LDAP.
Edit: Maybe #1209 is related to this behaviour.
Seeing the same thing as @Dbzman. In the snippet below, the avatar works for everyone but jdickson.
{ "_id" : "ddavis.jpg", "filename" : "ddavis.jpg", "contentType" : "image/jpeg", "length" : 62521, "chunkSize" : 261120, "uploadDate" : ISODate("2015-11-03T20:00:47.859Z"), "aliases" : null, "metadata" : null, "md5" : "51874096471757218b2c3b91d01df5d7" }
{ "_id" : "pawinn.jpg", "filename" : "pawinn.jpg", "contentType" : "image/png", "length" : 641195, "chunkSize" : 261120, "uploadDate" : ISODate("2015-10-29T18:20:23.880Z"), "aliases" : null, "metadata" : null, "md5" : "4759f278f04636da3b436d191eb8c5cc" }
{ "_id" : "skalmar.jpg", "filename" : "skalmar.jpg", "contentType" : "image/png", "length" : 34868, "chunkSize" : 261120, "uploadDate" : ISODate("2015-10-30T16:38:46.423Z"), "aliases" : null, "metadata" : null, "md5" : "b1ea58537b1d909be14d0beb1dc95764" }
{ "_id" : "gthorne.jpg", "filename" : "gthorne.jpg", "contentType" : "image/png", "length" : 4005, "chunkSize" : 261120, "uploadDate" : ISODate("2015-11-05T20:31:13.192Z"), "aliases" : null, "metadata" : null, "md5" : "d3cf585cf34b9a75355dc7086f3f6a56" }
{ "_id" : ObjectId("6a6469636b736f6e2e6a7067"), "filename" : "jdickson.jpg", "contentType" : "image/jpeg", "length" : 14909, "chunkSize" : 261120, "uploadDate" : ISODate("2015-10-29T17:47:43.089Z"), "aliases" : null, "metadata" : null, "md5" : "d21cc8d1f220ccbe64fa6d036b7d57c7" }
EDIT: Also using corporate LDAP, looking at #1209 as well.
The problem was related with this lib https://github.com/aheckmann/gridfs-stream/blob/master/lib%2Findex.js#L157
We've overridden this method to prevent this conversion.