@Controller public class FileController extends Object
Constructor and Description |
---|
FileController() |
Modifier and Type | Method and Description |
---|---|
String |
delete(org.springframework.ui.ModelMap model,
String pattern) |
String |
get(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.ModelMap model,
int startFile,
int pageSize,
Date date,
org.springframework.validation.Errors errors) |
void |
list(org.springframework.ui.ModelMap model,
int startFile,
int pageSize) |
void |
setFileService(FileService fileService)
The service used to manage file lists and uploads.
|
String |
upload(String path,
org.springframework.web.multipart.MultipartFile file,
org.springframework.ui.ModelMap model,
int startFile,
int pageSize,
Date date,
org.springframework.validation.Errors errors) |
String |
uploadRequest(String path,
org.springframework.web.multipart.MultipartFile file,
org.springframework.ui.ModelMap model,
int startFile,
int pageSize,
Date date,
org.springframework.validation.Errors errors) |
@Autowired public void setFileService(FileService fileService)
fileService
- the FileService
to set@RequestMapping(value="/files", method=POST) public String uploadRequest(@RequestParam String path, @RequestParam org.springframework.web.multipart.MultipartFile file, org.springframework.ui.ModelMap model, @RequestParam(defaultValue="0") int startFile, @RequestParam(defaultValue="20") int pageSize, @ModelAttribute(value="date") Date date, org.springframework.validation.Errors errors) throws Exception
Exception
@RequestMapping(value="/files/{path}", method=POST) public String upload(@PathVariable String path, @RequestParam org.springframework.web.multipart.MultipartFile file, org.springframework.ui.ModelMap model, @RequestParam(defaultValue="0") int startFile, @RequestParam(defaultValue="20") int pageSize, @ModelAttribute(value="date") Date date, org.springframework.validation.Errors errors) throws Exception
Exception
@RequestMapping(value="/files", method=GET) public void list(org.springframework.ui.ModelMap model, @RequestParam(defaultValue="0") int startFile, @RequestParam(defaultValue="20") int pageSize) throws Exception
Exception
@RequestMapping(value="/files/**", method=GET) public String get(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.ModelMap model, @RequestParam(defaultValue="0") int startFile, @RequestParam(defaultValue="20") int pageSize, @ModelAttribute(value="date") Date date, org.springframework.validation.Errors errors) throws Exception
Exception
Copyright © 2015. All rights reserved.