dataease-dm/backend/src/main/java/io/dataease/controller/CommonFilesController.java
2021-03-12 16:08:55 +08:00

23 lines
746 B
Java

package io.dataease.controller;
import io.dataease.service.CommonFilesService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("common-files")
public class CommonFilesController {
@Resource
private CommonFilesService commonFilesService;
@GetMapping("/images/{imageId}")
public ResponseEntity<byte[]> image(@PathVariable("imageId") String imageId) {
return commonFilesService.getImageById(imageId);
}
}