fixed bug to download banner file.

This commit is contained in:
Yoshihiro OKUMURA
2019-06-17 17:03:55 +09:00
parent bbaef3d810
commit 0646d26a44
+2 -3
View File
@@ -1,5 +1,4 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { MultiLang } from '../../../config';
import ItemUtil, { ItemBasicFile } from '../../lib/ItemUtil';
@@ -18,7 +17,7 @@ const BannerFile = (props: BannerFileProps) => {
}
const url = ItemUtil.getFileUrl(data);
return (
<Link to={url} download={data.original_file_name}><img src={url} alt="banner" /></Link>
<a href={url} download={data.original_file_name} target="_blank" rel="noopener noreferrer"><img src={url} alt="banner" /></a>
);
}
@@ -26,4 +25,4 @@ const UrlUtil = {
BannerFile,
}
export default UrlUtil;
export default UrlUtil;