fixed bug to download banner file.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user