Skip to content
Snippets Groups Projects
Commit c531e9ae authored by Gabriel Engel's avatar Gabriel Engel
Browse files

rollback avatar changes

parent 1cf27722
No related branches found
No related tags found
No related merge requests found
Meteor.startup -> Meteor.startup ->
storeType = 'FileSystem' storeType = 'GridFS'
# Sandstorm must store avatar in mongo
#if RocketChat.settings.get 'avatarStore_type'
# storeType = RocketChat.settings.get 'avatarStore_type'
if RocketChat.settings.get 'Accounts_AvatarStoreType'
storeType = RocketChat.settings.get 'Accounts_AvatarStoreType'
RocketChatStore = RocketChatFile[storeType] RocketChatStore = RocketChatFile[storeType]
...@@ -21,7 +18,7 @@ Meteor.startup -> ...@@ -21,7 +18,7 @@ Meteor.startup ->
transformWrite = (file, readStream, writeStream) -> transformWrite = (file, readStream, writeStream) ->
RocketChatFile.gm(readStream, file.fileName).background('#ffffff').resize(width, height+'^>').gravity('Center').extent(width, height).stream('jpeg').pipe(writeStream) RocketChatFile.gm(readStream, file.fileName).background('#ffffff').resize(width, height+'^>').gravity('Center').extent(width, height).stream('jpeg').pipe(writeStream)
path = "/var" path = "~/uploads"
if RocketChat.settings.get('Accounts_AvatarStorePath')?.trim() isnt '' if RocketChat.settings.get('Accounts_AvatarStorePath')?.trim() isnt ''
path = RocketChat.settings.get 'Accounts_AvatarStorePath' path = RocketChat.settings.get 'Accounts_AvatarStorePath'
...@@ -32,7 +29,6 @@ Meteor.startup -> ...@@ -32,7 +29,6 @@ Meteor.startup ->
transformWrite: transformWrite transformWrite: transformWrite
WebApp.connectHandlers.use '/avatar/', (req, res, next) -> WebApp.connectHandlers.use '/avatar/', (req, res, next) ->
console.log 'avatar called!'
this.params = this.params =
username: req.url.replace(/^\//, '').replace(/\?.*$/, '') username: req.url.replace(/^\//, '').replace(/\?.*$/, '')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment