| | |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('storage:list')") |
| | | @PreAuthorize("@el.check('storage:download')") |
| | | public void exportFile(HttpServletResponse response, LocalStorageQueryCriteria criteria) throws IOException { |
| | | localStorageService.download(localStorageService.queryAll(criteria), response); |
| | | } |
| | |
| | | @ApiOperation("上传文件") |
| | | @PreAuthorize("@el.check('storage:add')") |
| | | public ResponseEntity<Object> createFile(@RequestParam String name, @RequestParam("file") MultipartFile file){ |
| | | localStorageService.create(name, file); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | LocalStorage localStorage = localStorageService.create(null, file); |
| | | return new ResponseEntity<>(localStorage, HttpStatus.CREATED); |
| | | } |
| | | |
| | | @ApiOperation("上传图片") |