Update: FileDialog download method
This commit is contained in:
@@ -9,16 +9,20 @@ function FileDialog(props) {
|
||||
|
||||
let navigate = useNavigate();
|
||||
|
||||
const downloadURL = "/api/v1/get_file_direct?id=" + props.file.id;
|
||||
|
||||
return (
|
||||
<dialog open={props.showStatus}>
|
||||
<p>{props.file.filename}</p>
|
||||
<p>
|
||||
Download 使用 Axios 异步下载
|
||||
Download 使用浏览器下载原文件
|
||||
<br />
|
||||
Play 调用网页播放器播放
|
||||
<br />
|
||||
</p>
|
||||
<button>Download</button>
|
||||
<a href={downloadURL} download>
|
||||
<button>Download</button>
|
||||
</a>
|
||||
<button
|
||||
onClick={() => {
|
||||
props.setPlayingFile(props.file);
|
||||
|
||||
Reference in New Issue
Block a user