【问题标题】:Alfresco REST API for downloading document用于下载文档的 Alfresco REST API
【发布时间】:2015-06-23 05:12:40
【问题描述】:

我想使用 Afresco REST API 下载文档。经过一番研究,我发现了这个 REST API:

/alfresco/s/api/node/content{property}/{store_type}/{store_id}/{id}

但我不知道如何传递参数。

如果我在 Share 中的文档详细信息 URL 是:

http://127.0.0.1:8080/share/page/context/mine/document-details?nodeRef=workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2 

{property}{store_type}{store_id}{id} 中应该传递什么?

【问题讨论】:

    标签: alfresco alfresco-share


    【解决方案1】:

    对于这个 NodeRef

    workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2
    

    参数的值将是:

    {property}: content
    {store_type}: Workspace
    {store_id}: spaceStore
    {id}: 7f77488a-60a0-48c3-9369-77183ccad0d2 
    

    Krutik 已经指定了与每个参数相关的详细信息。

    你应该使用这个下载地址。

    /alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
    

    d=directa=attached 的位置。

    attachdirect元素用于指示是直接在浏览器中显示流还是作为文件附件下载。

    【讨论】:

    【解决方案2】:

    您可以在以下 URL 的 alfresco 中找到每个 Web 脚本 (REST API) 的详细信息。

    http://localhost:8080/alfresco/service/index
    

    对于您的 API,如下所示。

    http://localhost:8080/alfresco/service/script/org/alfresco/cmis/content.get
    

    参数说明如下。

    Property   : Name of property which you want to retrieve.
    store_type : Workspace Protocol
    store_id   : Store Id of node
    id         : Id of node.
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-11
    • 2018-08-24
    • 2020-12-23
    • 2014-07-22
    相关资源
    最近更新 更多