Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix: aria2 name error (fix alist-org/alist#1187)
Browse files Browse the repository at this point in the history
* fix: aria2 name error (fix alist-org/alist#1187)

* fix: aria2 file name typo
  • Loading branch information
WangEdward committed Jul 8, 2022
1 parent f6df77d commit 77bc2e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/aria2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ export const downloadWithAria2 = (
} else {
for (let link of linkArr) {
let id = md5_16(link);
let fileNameArr: string[] = link.split("/");
let fileName = fileNameArr[fileNameArr.length - 1];
let options = {
out: fileName,
"check-certificate": "false",
};
let data = {
id: id,
jsonrpc: "2.0",
method: "aria2.addUri",
params: ["token:" + secret, [link]],
params: ["token:" + secret, [link], options],
};
axios.post(url, data).then(async (resp) => {
let res = resp.data;
Expand Down

0 comments on commit 77bc2e0

Please sign in to comment.