上传文件时,我正在使用以下API。
While uploading a file, I am using the below API.
localhost:8080/alfresco/service/api/upload文件已成功在露天仓库中上传。 现在我的要求是,如果我想添加自定义属性,例如 custom1,custom2,custom3,custom4 等,您能否使用浏览器API给我们提供解决方案/ AJAX调用。
File is getting uploaded successfully in alfresco repository. Now my requirement is, If I want to add custom properties like custom1, custom2, custom3, custom4 etc Could you please give us a solution using browser API/AJAX call.
下面是我的代码
<form method="post" name="uploadForm" enctype='multipart/form-data' id="upload_form" action="localhost:8080/alfresco/service/api/upload"> <input type="hidden" name="destination" id="destination" value="workspace://SpacesStore/3f132339-bac1-4e0c-be03-b2ec5dbea61b" /> <input type="hidden" name="overwrite" id="overwrite" value="false" /> <br /> <label>custom1:</label> <br /> <input type="text" name="custom1" id="custom1" /> <br /> <label>custom2:</label> <br /> <input type="text" name="custom2" id="custom2" /> <br /> <label>custom3:</label> <br /> <input type="text" name="custom3" id="custom3" /> <br /> <label>custom4:</label> <br /> <input type="text" name="custom4" id="custom4" /> <br /> <br /> <label>File:</label> <br /> <input class="button" type="file" name="filedata" id="filedata" /> <br /> <input class="button" type="submit" name="submit" value="Upload" /> </form>推荐答案
请阅读本教程,以便您了解如何在内容模型中定义属性
Please read this tutorial on custom content properties so that you can understand how to define your properties in the content model.
然后,您可以使用Alfresco REST API,或者最好使用CMIS API来更新属性。
Then you can use the Alfresco REST API, or preferably, the CMIS API to update the properties.
更多推荐
Alfresco ::如何使用REST API在文件上传期间添加自定义属性
发布评论