package jnpf.controller; import jakarta.servlet.http.HttpServletResponse; import jnpf.fileStorage.dms.DmsOnlyOfficeFileService; import lombok.RequiredArgsConstructor; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.UUID; @RestController @RequestMapping("/Dms/OnlyOffice") @RequiredArgsConstructor public class DmsOnlyOfficeFileController { private final DmsOnlyOfficeFileService fileService; @GetMapping("/{fileVersionId}") public void stream(@PathVariable("fileVersionId") UUID fileVersionId, @RequestParam("ticket") String accessTicket, @RequestParam(value = "printBase", defaultValue = "false") boolean printBase, HttpServletResponse response) { fileService.stream(fileVersionId, accessTicket, printBase, response); } }