Skip to content

Commit

Permalink
Merge pull request #107 from usnistgov/fix/safari-download
Browse files Browse the repository at this point in the history
Fix file naming on Safari downloads
  • Loading branch information
RayPlante authored Apr 12, 2024
2 parents 957b812 + 9aa70a7 commit 38d2f58
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public void downloadFile(String dsid, String filepath, String version, HttpServl
response.setHeader("Content-Length", Long.toString(sh.getInfo().contentLength));
response.setHeader("Content-Type", sh.getInfo().contentType);
response.setHeader("Content-Disposition",
"filename=\"" + Pattern.compile("/+").matcher(filepath).replaceAll("_") + "\"");
"attachment;filename=\"" + Pattern.compile("/+").matcher(filepath).replaceAll("_") + "\"");

int len;
byte[] buf = new byte[100000];
Expand Down

0 comments on commit 38d2f58

Please sign in to comment.