Package cronapi.rest
Class DownloadREST
- java.lang.Object
-
- cronapi.rest.DownloadREST
-
@RestController @RequestMapping("/api/cronapi") public class DownloadREST extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDownloadREST.DownloadItem
-
Field Summary
Fields Modifier and Type Field Description static SimpleDateFormatformatstatic FileTEMP_FOLDER
-
Constructor Summary
Constructors Constructor Description DownloadREST()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringauthorizeUpload(Callback callback)voiddownload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String id)static StringgetDownloadUrl(File file)static StringgetDownloadUrl(File file, String labelForDownload)static StringgetDownloadUrl(InputStream inputStream, String labelForDownload)static FilegetTempFile(String name)RestResultupload(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, String id, org.springframework.web.multipart.MultipartFile[] uploadfiles)
-
-
-
Field Detail
-
format
public static SimpleDateFormat format
-
TEMP_FOLDER
public static File TEMP_FOLDER
-
-
Method Detail
-
getDownloadUrl
public static String getDownloadUrl(InputStream inputStream, String labelForDownload)
-
upload
@RequestMapping(method=POST, value="/upload/{id}") public RestResult upload(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, @PathVariable("id") String id, @RequestParam("file") org.springframework.web.multipart.MultipartFile[] uploadfiles)
-
-