Update SlipGajiController.java
Penyesuaian content disposition filename path generate file excel
This commit is contained in:
parent
a4e4fdaca8
commit
13065f98a3
@ -92,7 +92,9 @@ public class SlipGajiController {
|
||||
String fileNamePath = slipGajiService.writeExcel(bulan);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" + fileNamePath);
|
||||
return new ResponseEntity<>(true, HttpStatus.OK);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("filename", fileNamePath);
|
||||
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user