Skip to content

Commit

Permalink
Use getURL isntead of Meteor.absoluteUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Oct 7, 2019
1 parent cba9800 commit b7d70c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/utils/server/functions/normalizeMessageFileUpload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Meteor } from 'meteor/meteor';

import { getURL } from '../../lib/getURL';
import { FileUpload } from '../../../file-upload/server';
import { Uploads } from '../../../models/server';

Expand All @@ -11,7 +10,7 @@ export const normalizeMessageFileUpload = (message) => {
return message;
}
message.fileUpload = {
publicFilePath: Meteor.absoluteUrl(`${ FileUpload.getPath(`${ file._id }/${ encodeURI(file.name) }`).substring(1) }${ jwt ? `?token=${ jwt }` : '' }`),
publicFilePath: getURL(`${ FileUpload.getPath(`${ file._id }/${ encodeURI(file.name) }`).substring(1) }${ jwt ? `?token=${ jwt }` : '' }`, { cdn: false, full: true }),
type: file.type,
size: file.size,
};
Expand Down

0 comments on commit b7d70c1

Please sign in to comment.