微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ETKORP CouchDB渲染附件

如何解决ETKORP CouchDB渲染附件

我的附件记录在沙发上。

要恢复,我使用以下代码

@RequestMapping(value = "/getDocument",method = RequestMethod.GET)
    public ResponseEntity<String> getDocument(@RequestParam(value = "document_id",defaultValue = "") String document_id,@RequestParam(value = "anexo_id",defaultValue = "") String attch_id) throws IOException {

        document_id = URL.decodeParam(document_id);
        attch_id = URL.decodeParam(attch_id);
        
        MyRepository repo;
        
        try {
            repo = new WebhookRepository(Webhook.class,this.service.getDb());
            AttachmentInputStream attachment = this.service.getAttachment(repo,document_id,attch_id);
            
            
             
            
            return ResponseEntity.ok().body(attachment.toString());
            
        } catch (dbaccessException e) {
            ResponseEntity.ok().body(e.toString());
            
        } catch (MalformedURLException e) {
            // Todo Auto-generated catch block
            e.printstacktrace();
        }
        return null;
        
        
    }

但是邮递员收到的答案是:org.ektorp.AttachmentInputStream@7a32fb41

我需要返回渲染的图像或附件中记录的base64字符串。

如何制作?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。