Skip to content

Commit

Permalink
added replace for ngrok url
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Dec 26, 2022
1 parent 95069f2 commit 7b7a5a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/AttachmentCarousel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import AttachmentView from '../AttachmentView';
import addEncryptedAuthTokenToURL from '../../libs/addEncryptedAuthTokenToURL';
import canUseTouchScreen from '../../libs/canUseTouchscreen';
import CONST from '../../CONST';
import Config from '../../CONFIG';
import ONYXKEYS from '../../ONYXKEYS';
import reportPropTypes from '../../pages/reportPropTypes';
import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
Expand Down Expand Up @@ -83,8 +84,12 @@ class AttachmentCarousel extends React.Component {
* @returns {Object}
*/
getAttachment(attachmentItem) {
const sourceURL = _.get(attachmentItem, 'sourceURL', '');
const file = _.get(attachmentItem, 'file', {name: ''});
const originalSourceURL = _.get(attachmentItem, 'sourceURL', '');
const sourceURL = originalSourceURL.replace(
Config.EXPENSIFY.EXPENSIFY_URL,
Config.EXPENSIFY.URL_API_ROOT,
);
this.props.onNavigate({sourceURL: addEncryptedAuthTokenToURL(sourceURL), file});

return {
Expand Down

0 comments on commit 7b7a5a0

Please sign in to comment.