Skip to content
Snippets Groups Projects
Commit 005d2da6 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #5969 from RocketChat/fix/5934-inline-image

Allow pass inline image (base64) on attachments
parents e5f545b0 8f555d24
No related merge requests found
......@@ -2,6 +2,9 @@ import moment from 'moment'
Template.messageAttachment.helpers
fixCordova: (url) ->
if url?.indexOf('data:image') is 0
return url
if Meteor.isCordova and url?[0] is '/'
url = Meteor.absoluteUrl().replace(/\/$/, '') + url
query = "rc_uid=#{Meteor.userId()}&rc_token=#{Meteor._localStorage.getItem('Meteor.loginToken')}"
......
......@@ -30,6 +30,9 @@ Template.uploadedFilesList.helpers
return '/file-upload/' + @_id + '/' + @name
fixCordova: (url) ->
if url?.indexOf('data:image') is 0
return url
if Meteor.isCordova and url?[0] is '/'
url = Meteor.absoluteUrl().replace(/\/$/, '') + url
query = "rc_uid=#{Meteor.userId()}&rc_token=#{Meteor._localStorage.getItem('Meteor.loginToken')}"
......
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