Skip to content

Commit

Permalink
0.0.20
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Apr 15, 2023
1 parent c3738a3 commit 72431d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions built/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ export async function downloadUrl(url, path, settings = defaultDownloadConfig) {
}
const contentDisposition = res.headers['content-disposition'];
if (contentDisposition != null) {
const parsed = parse(contentDisposition);
if (parsed.parameters.filename) {
filename = parsed.parameters.filename;
try {
const parsed = parse(contentDisposition);
if (parsed.parameters.filename) {
filename = parsed.parameters.filename;
}
}
catch (e) {
console.log(`Failed to parse content-disposition: ${contentDisposition}\n${e}`);
}
}
}).on('downloadProgress', (progress) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey-media-proxy",
"version": "0.0.19",
"version": "0.0.20",
"description": "The Media Proxy for Misskey",
"main": "built/index.js",
"packageManager": "[email protected]",
Expand Down

0 comments on commit 72431d8

Please sign in to comment.