serve static assets on urls with file extension #538

Merged
bones7242 merged 19 commits from 515-showlite-serves-asset into master 2018-07-20 18:57:12 +02:00
4 changed files with 9 additions and 7 deletions
Showing only changes of commit df623bb84a - Show all commits

View file

@ -89,7 +89,7 @@ function (_React$Component) {
}),
content: _react.default.createElement(_ClickToCopy.default, {
id: 'short-link',
value: "".concat(host, "/").concat(shortId, "/").concat(name, ".").concat(fileExt)
value: "".concat(host, "/").concat(shortId, "/").concat(name)
})
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_RowLabeled.default, {
label: _react.default.createElement(_Label.default, {
@ -102,9 +102,9 @@ function (_React$Component) {
id: 'embed-text-image',
value: "<img src=\"".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt, "\"/>")
}))
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement(_reactRouterDom.Link, {
})), _react.default.createElement(_Row.default, null, _react.default.createElement(_SpaceBetween.default, null, _react.default.createElement("a", {
className: "link--primary",
to: "/".concat(shortId, "/").concat(name, ".").concat(fileExt)
href: "".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt)
}, "Direct Link"), _react.default.createElement("a", {
className: 'link--primary',
href: "".concat(host, "/").concat(claimId, "/").concat(name, ".").concat(fileExt),

View file

@ -203,6 +203,7 @@ var createAssetMetaTags = function createAssetMetaTags(_ref3) {
});
}
console.log('metaTags:', metaTags);
return metaTags;
};

View file

@ -50,7 +50,7 @@ class AssetInfo extends React.Component {
content={
<ClickToCopy
id={'short-link'}
value={`${host}/${shortId}/${name}.${fileExt}`}
value={`${host}/${shortId}/${name}`}
/>
}
/>
@ -81,12 +81,12 @@ class AssetInfo extends React.Component {
<Row>
<SpaceBetween>
<Link
<a
className='link--primary'
to={`/${shortId}/${name}.${fileExt}`}
href={`${host}/${claimId}/${name}.${fileExt}`}
>
Direct Link
</Link>
</a>
<a
className={'link--primary'}
href={`${host}/${claimId}/${name}.${fileExt}`}

View file

@ -82,6 +82,7 @@ const createAssetMetaTags = ({siteHost, siteTitle, siteTwitter, asset, defaultDe
metaTags.push({property: 'og:type', content: 'article'});
metaTags.push({property: 'twitter:card', content: 'summary_large_image'});
}
console.log('metaTags:', metaTags);
return metaTags;
};