|
|
@@ -48,12 +48,13 @@ public class PreviewController {
|
|
|
public String reviewDocFile(PreviewVo vo, Model model) {
|
|
|
vo.setEdit(false);
|
|
|
log.info("==> 查看文档 vo: {}", vo);
|
|
|
- if (!ossTemplate.exist(vo.getBucket(), vo.getName())) {
|
|
|
+ Pair<Document, DocumentEditParam> pair = docInfo(vo);
|
|
|
+
|
|
|
+ if (!ossTemplate.exist(pair.getKey().getStorage(), vo.getName())) {
|
|
|
model.addAttribute("name", vo.getName());
|
|
|
return "/notFound";
|
|
|
}
|
|
|
|
|
|
- Pair<Document, DocumentEditParam> pair = docInfo(vo);
|
|
|
model.addAttribute("document", pair.getKey());
|
|
|
model.addAttribute("documentEditParam", pair.getValue());
|
|
|
|