content disposition: fixed filename
This commit is contained in:
parent
a88d0e59f6
commit
d7c220e88d
|
@ -37,7 +37,7 @@ public class PublicApiController {
|
||||||
res.sendError(HttpStatus.BAD_REQUEST.value(), "Invalid year");
|
res.sendError(HttpStatus.BAD_REQUEST.value(), "Invalid year");
|
||||||
}
|
}
|
||||||
|
|
||||||
final String filename = String.format("%s_%s_%s.log", year, month, country);
|
final String filename = String.format("%04d_%02d_%s.log", year, month, country);
|
||||||
|
|
||||||
res.setContentType(MediaType.TEXT_PLAIN.getType());
|
res.setContentType(MediaType.TEXT_PLAIN.getType());
|
||||||
res.setHeader("Content-Disposition", "attachment; filename=" + filename);
|
res.setHeader("Content-Disposition", "attachment; filename=" + filename);
|
||||||
|
|
Loading…
Reference in New Issue