This commit is contained in:
Rizky
2024-01-24 07:35:44 +07:00
parent 829f1367dc
commit a63cc40afe
6 changed files with 91 additions and 80 deletions
+1
View File
@@ -190,6 +190,7 @@ export const downloadFile = async (
if (_url.hostname === "localhost") {
_url.hostname = "127.0.0.1";
}
g.log.info(`Downloading ${url} to ${filePath}`);
const res = await fetch(_url);
if (res.body) {
const file = Bun.file(filePath);