如何通过RestSharp在Alfresco上传二进制内容八位字节?

问题描述 投票:0回答:1

我尝试通过restful api alfresco放二进制文件,它工作,它有内容,当我编辑文本文件但该pdf文件无法预览,可能是内容的编码不是真的?有人有解决方案吗?我使用restSharp来做到这一点

IRestRequest requestPutContentFile = new RestRequest(APILocation._CORE_API + "/nodes/" + docNode.Entry.Id + "/content"+"?alf_ticket="+Ticket,Method.PUT);
requestPutContentFile.AddParameter("application/x-www-form-urlencoded", Content, ParameterType.RequestBody);

IRestResponse responsePutContentFile = client.Execute(requestPutContentFile);

https://api-explorer.alfresco.com/api-explorer/#!/nodes/updateNodeContent

/露天/ API / - 默认/公共/露天/版本/ 1 /节点/ {NODEID} /内容

enter image description here

c# alfresco restsharp
1个回答
0
投票

预览不适用于PDF,但适用于文本?

最有可能的问题在于上传内容的mimetype,以及可用的变换器。

像@Gagravarr建议的那样,在Node Browser中查看mimetype(“cm:content”)属性的内容,查看日志查找转换错误,并查看支持的转换。

http://localhost:8080/alfresco/service/mimetypes

© www.soinside.com 2019 - 2024. All rights reserved.