@WebController @RequestMapping(value="/") public class FileUploadAndDownloadWebController extends JspSupportWebController
JspSupportWebController.Target| 构造器和说明 |
|---|
FileUploadAndDownloadWebController() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
downloadArchivedFile(String param) |
void |
downloadImage(String param,
int perfectWidth,
int perfectHeight) |
EasyUIAjaxResponse<ArchivedFile> |
uploadArchivedFile(org.springframework.web.multipart.MultipartFile multipartFile) |
protected void |
writeImage(String fileName,
File file,
double scale) |
crashPage, display, error, error, exception, jump, notfound, pageNotFoundException, redirect, resourceNotFoundException, setWebControllerName, success, success, success, theme, webExceptiongetObjectMapper, writeFile, writeStringgetRequest, getResponse, getServletContext@ResponseBody
@RequestMapping(path="file/{param}",
method=GET)
public void downloadArchivedFile(@PathVariable(value="param")
String param)
throws IOException
IOException@ResponseBody
@RequestMapping(value="image/{param}",
method=GET)
public void downloadImage(@PathVariable(value="param")
String param,
@RequestParam(required=false,defaultValue="-1")
int perfectWidth,
@RequestParam(required=false,defaultValue="-1")
int perfectHeight)
throws IOException
IOExceptionprotected void writeImage(String fileName, File file, double scale) throws FileNotFoundException, IOException
@ResponseBody
@RequestMapping(value="uploadFile",
method=POST)
public EasyUIAjaxResponse<ArchivedFile> uploadArchivedFile(@RequestParam(value="file")
org.springframework.web.multipart.MultipartFile multipartFile)
throws FileArchiveException
Copyright © 2018 Euler Project. All rights reserved.