Reputation: 225
Actually we are building an authoring tool through which authors will prepare some assessment. Assessment can be kind of MCQ or Multiple choice. Now in that assessment image/audio/video can be a part of question as well as answers. Now to store all these assessment we will use alfresco repository. Now while storing or creating the assessment authors can define or create different custom properties for image file or any type of file. we have to provide those kind of facilities while creating the assessment to authors. Now our system can talk to different enterprise content management system, that's why we are planning to use CMIS/RESTful services of alfresco. We found those RESTful api through which we can create/upload directory/file in an alfresco repository but till we did not find any RESTful api to create custom metadata in alfresco. Do alfresco have any RESTful API to create custom metadata/properties while uploading/creating new file in alfresco? If not what are the other ways? Is there any way apart from configuration or settings changes so that we can create those custom metadata on the fly? API will be good as because we can use them directly from UI using jquery or angular.. any help regarding this will be much appreciated.
Upvotes: 0
Views: 1057
Reputation: 10538
The custom content types tutorial explains how to define the custom content types and shows how to use CMIS to set values on custom properties defined in your model.
If you need additional examples, here is one. It shows files being uploaded from a directory on your machine and the latitude/longitude being set as properties. Those are out-of-the-box properties but they could just as easily be custom properties because there is no difference in how you set out-of-the-box properties versus custom properties.
The example is written in Java, but it uses OpenCMIS and the AtomPub restful binding. CMIS also has a browser binding which you may find useful if you are using jquery or angular to talk to the binding directly. You can read more about the Browser Binding in the CMIS 1.1 spec.
Upvotes: 3