Package com.bytedesk.core.upload
Class UploadFilePreview
java.lang.Object
com.bytedesk.core.upload.UploadFilePreview
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.core.io.Resource>
Deprecated.void
preview
(String year, String month, String day, String filename, jakarta.servlet.http.HttpServletResponse response) 浏览器预览文件,或放到标签中在线展示 http://127.0.0.1:9003/file/2024/09/16/20240916144702_身份证-背面.jpg
-
Field Details
-
uploadService
-
-
Constructor Details
-
UploadFilePreview
public UploadFilePreview()
-
-
Method Details
-
preview
@GetMapping("/{yyyy}/{MM}/{dd}/{filename:.+}") @ResponseBody public void preview(@PathVariable(name="yyyy") String year, @PathVariable(name="MM") String month, @PathVariable(name="dd") String day, @PathVariable String filename, jakarta.servlet.http.HttpServletResponse response) throws IOException 浏览器预览文件,或放到标签中在线展示 http://127.0.0.1:9003/file/2024/09/16/20240916144702_身份证-背面.jpg
- Parameters:
filename
-- Throws:
IOException
-
download
@Deprecated @GetMapping("/download/{yyyy}/{MM}/{dd}/{filename:.+}") @ResponseBody public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> download(@PathVariable(name="yyyy") String year, @PathVariable(name="MM") String month, @PathVariable(name="dd") String day, @PathVariable String filename) throws UnsupportedEncodingException Deprecated.浏览器下载文件 http://127.0.0.1:9003/file/download/2024/09/16/20240319162820_img-service2.png- Parameters:
filename
-- Returns:
- Throws:
UnsupportedEncodingException
-