Skip to content

Commit

Permalink
Add Content-Disposition header for bulk request download in browser
Browse files Browse the repository at this point in the history
See #91
  • Loading branch information
fsteeg committed Jun 20, 2018
1 parent 01a4faf commit ad14314
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/HomeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ public Result search(String q, String filter, int from, int size, String format)
return htmlSearch(q, filter, from, size, responseFormat.queryParamString, response);
}
case BULK: {
response().setHeader("Content-Disposition",
String.format("attachment; filename=\"lobid-gnd-bulk-%s.jsonl\"", System.currentTimeMillis()));
return jsonLines(queryString, response);
}
default: {
Expand Down

0 comments on commit ad14314

Please sign in to comment.