Redirect after download
This commit is contained in:
parent
d8f867745d
commit
1cb26a7f99
2 changed files with 2 additions and 2 deletions
2
index.js
2
index.js
|
@ -125,7 +125,7 @@ app.get("/download", async (req, res) => {
|
||||||
}
|
}
|
||||||
else if (fs.existsSync(filePath)) {
|
else if (fs.existsSync(filePath)) {
|
||||||
res.write(`<iframe src="/convert?file=${fileName}&format=${format}&url=${url}"></iframe>"`)
|
res.write(`<iframe src="/convert?file=${fileName}&format=${format}&url=${url}"></iframe>"`)
|
||||||
res.write(downloadHTML.substring(downloadHTML.indexOf("{CONTENT}") + 9), () => { res.end() })
|
res.write(downloadHTML.substring(downloadHTML.indexOf("{CONTENT}") + 9) + `<meta http-equiv="Refresh" content="0; url='/'" />`, () => { res.end() })
|
||||||
} else {
|
} else {
|
||||||
res.write("<p>An error has occured!!! We're not exactly sure what the error is, but we cant seem to find the download file. Double check the URL, and if the URL is fine, then file an issue on codeberg. </p>")
|
res.write("<p>An error has occured!!! We're not exactly sure what the error is, but we cant seem to find the download file. Double check the URL, and if the URL is fine, then file an issue on codeberg. </p>")
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<form action="/download" method="get" target="_blank">
|
<form action="/download" method="get">
|
||||||
<p style="margin-bottom: 1px;">Video URL:</p>
|
<p style="margin-bottom: 1px;">Video URL:</p>
|
||||||
<input required type="url" id="url" placeholder="Enter url" name="url" style="width: 80vw; max-width: 550px">
|
<input required type="url" id="url" placeholder="Enter url" name="url" style="width: 80vw; max-width: 550px">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue