Skip to content
Snippets Groups Projects
Commit 80a3c2e2 authored by Alec's avatar Alec Committed by Rodrigo Nascimento
Browse files

Subdir images (#3695)

* possible fix to images in subdir

* fix to images in subdir

* fix type of key to loginTokenKey

* change to method of getting login token to use _storedLoginToken

* add back escape function
parent 07996bba
No related merge requests found
...@@ -13,7 +13,7 @@ if UploadFS? ...@@ -13,7 +13,7 @@ if UploadFS?
cookie = new Cookies() cookie = new Cookies()
if Meteor.isClient if Meteor.isClient
document.cookie = 'rc_uid=' + escape(Meteor.userId()) + '; path=/' document.cookie = 'rc_uid=' + escape(Meteor.userId()) + '; path=/'
document.cookie = 'rc_token=' + escape(Meteor._localStorage.getItem('Meteor.loginToken')) + '; path=/' document.cookie = 'rc_token=' + escape(Accounts._storedLoginToken()) + '; path=/'
Meteor.fileStore = new UploadFS.store.GridFS Meteor.fileStore = new UploadFS.store.GridFS
collection: RocketChat.models.Uploads.model collection: RocketChat.models.Uploads.model
......
...@@ -8,7 +8,7 @@ Template.messageAttachment.helpers ...@@ -8,7 +8,7 @@ Template.messageAttachment.helpers
else else
url = url + '&' + query url = url + '&' + query
return url return Meteor.absoluteUrl().replace(/\/$/, '') + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + url
parsedText: -> parsedText: ->
renderMessageBody { msg: this.text } renderMessageBody { msg: this.text }
......
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