changed embedded urls to use /asset route
This commit is contained in:
parent
6fe04b13ce
commit
9370dc303d
5 changed files with 9 additions and 7 deletions
|
@ -19,7 +19,7 @@ var AssetPreview = function AssetPreview(_ref) {
|
|||
fileExt = _ref$claimData.fileExt,
|
||||
contentType = _ref$claimData.contentType,
|
||||
thumbnail = _ref$claimData.thumbnail;
|
||||
var directSourceLink = "".concat(claimId, "/").concat(name, ".").concat(fileExt);
|
||||
var directSourceLink = "asset/".concat(name, "/").concat(claimId);
|
||||
var showUrlLink = "/".concat(claimId, "/").concat(name);
|
||||
return _react.default.createElement(_reactRouterDom.Link, {
|
||||
to: showUrlLink
|
||||
|
|
|
@ -82,7 +82,7 @@ function (_React$Component) {
|
|||
case 'image/gif':
|
||||
return _react.default.createElement("img", {
|
||||
className: "asset-image",
|
||||
src: "/".concat(claimId, "/").concat(name, ".").concat(fileExt),
|
||||
src: "/asset/".concat(name, "/").concat(claimId),
|
||||
alt: name
|
||||
});
|
||||
|
||||
|
@ -92,7 +92,7 @@ function (_React$Component) {
|
|||
controls: true,
|
||||
poster: thumbnail
|
||||
}, _react.default.createElement("source", {
|
||||
src: "/".concat(claimId, "/").concat(name, ".").concat(fileExt)
|
||||
src: "/asset/".concat(name, "/").concat(claimId)
|
||||
}), _react.default.createElement("p", null, "Your browser does not support the ", _react.default.createElement("code", null, "video"), " element."));
|
||||
|
||||
default:
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { Link } from 'react-router-dom';
|
||||
|
||||
const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {
|
||||
const directSourceLink = `${claimId}/${name}.${fileExt}`;
|
||||
const directSourceLink = `asset/${name}/${claimId}`;
|
||||
const showUrlLink = `/${claimId}/${name}`;
|
||||
return (
|
||||
<Link to={showUrlLink} >
|
||||
|
|
|
@ -39,7 +39,7 @@ class AssetDisplay extends React.Component {
|
|||
return (
|
||||
<img
|
||||
className='asset-image'
|
||||
src={`/${claimId}/${name}.${fileExt}`}
|
||||
src={`/asset/${name}/${claimId}`}
|
||||
alt={name}
|
||||
/>
|
||||
);
|
||||
|
@ -49,7 +49,9 @@ class AssetDisplay extends React.Component {
|
|||
className='asset-video'
|
||||
controls poster={thumbnail}
|
||||
>
|
||||
<source src={`/${claimId}/${name}.${fileExt}`} />
|
||||
<source
|
||||
src={`/asset/${name}/${claimId}`}
|
||||
/>
|
||||
<p>Your browser does not support the <code>video</code> element.</p>
|
||||
</video>
|
||||
);
|
||||
|
|
|
@ -1 +1 @@
|
|||
<video width="100%" controls src="{{host}}/{{claimId}}/{{name}}.mp4" type="video/mp4"></video>
|
||||
<video width="100%" controls src="{{host}}/asset/{{name}}/{{claimId}}" type="video/mp4"></video>
|
||||
|
|
Loading…
Reference in a new issue