diff --git a/client/build/components/AssetPreview/index.js b/client/build/components/AssetPreview/index.js index 994b75ce..1d044764 100644 --- a/client/build/components/AssetPreview/index.js +++ b/client/build/components/AssetPreview/index.js @@ -19,10 +19,10 @@ var AssetPreview = function AssetPreview(_ref) { fileExt = _ref$claimData.fileExt, contentType = _ref$claimData.contentType, thumbnail = _ref$claimData.thumbnail; - var directSourceLink = "asset/".concat(name, "/").concat(claimId); - var showUrlLink = "/".concat(claimId, "/").concat(name); + var embedUrl = "/".concat(claimId, "/").concat(name, ".").concat(fileExt); + var showUrl = "/".concat(claimId, "/").concat(name); return _react.default.createElement(_reactRouterDom.Link, { - to: showUrlLink + to: showUrl }, function () { switch (contentType) { case 'image/jpeg': @@ -31,7 +31,7 @@ var AssetPreview = function AssetPreview(_ref) { case 'image/gif': return _react.default.createElement("img", { className: 'asset-preview-image', - src: directSourceLink, + src: embedUrl, alt: name }); diff --git a/client/src/components/AssetPreview/index.jsx b/client/src/components/AssetPreview/index.jsx index e9e10cef..be09c200 100644 --- a/client/src/components/AssetPreview/index.jsx +++ b/client/src/components/AssetPreview/index.jsx @@ -2,10 +2,10 @@ import React from 'react'; import { Link } from 'react-router-dom'; const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => { - const directSourceLink = `asset/${name}/${claimId}`; - const showUrlLink = `/${claimId}/${name}`; + const embedUrl = `/${claimId}/${name}.${fileExt}`; + const showUrl = `/${claimId}/${name}`; return ( - + {(() => { switch (contentType) { case 'image/jpeg': @@ -15,7 +15,7 @@ const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, c return ( {name} );