Skip to content
Snippets Groups Projects
Commit afe4be0c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix downloaded filenames in v3.19

Files were being downloaded as undefined.undefined because I didn't emulate
the old 'base' and 'ext' properties - just use a single 'name' property now.
parent 2e957980
Branches
Tags
No related merge requests found
...@@ -49,7 +49,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && request ...@@ -49,7 +49,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') && request
} }
http_reply.header['Content-Type'] = mt; http_reply.header['Content-Type'] = mt;
if (mt === 'application/octet-stream') { if (mt === 'application/octet-stream') {
http_reply.header['Content-Disposition'] = 'attachment; filename="' + file.base + '.' + file.ext + '"'; http_reply.header['Content-Disposition'] = 'attachment; filename="' + file.name + '"';
} else { } else {
http_reply.header['Content-Disposition'] = 'inline'; http_reply.header['Content-Disposition'] = 'inline';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment