12-23-2020 11:14 AM
Hi,
I need to upload a file to the basic alfresco repository using a CMIS 1.1 API, the API can be of any binding Atompub or browser binding. Which API URL can be used in order to upload the file?
If any such URL can be used please do provide any references.
12-23-2020 11:35 PM
Either browser binding or Atompub binding can do ,but browser binding is recommended.
Following is code example using apache chemistry cmis api,
Fiirst you need to create a session,then using the session to create folder or document.
SessionFactory sessionFactory = SessionFactoryImpl.newInstance(); Map<String, String> params = new HashMap<String, String>(); params.put(SessionParameter.USER, "admin"); params.put(SessionParameter.PASSWORD, "admin"); params.put(SessionParameter.BROWSER_URL, "http://192.168.11.100:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser"); params.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value()); List<Repository> repos = sessionFactory.getRepositories(params); Session session = repos.get(0).createSession();
About how to create folder or document please refer to https://chemistry.apache.org/java/examples/example-create-update.html
12-25-2020 01:53 AM
Can we get a direct URL which we can hit via postman because I am not looking for any custom code to be done for the same?
12-25-2020 06:21 AM
You can use api-explorer create node api.
12-25-2020 12:21 PM
Rest APIs works fine but I am looking for CMIS API (either using browser binding method or using atompub method) to insert/upload a file on to the alfresco repository.
Can you please suggest me any of the CMIS API URL for the same? I am not looking for any custom code.
12-26-2020 11:13 AM
For browser binding please refer to http://docs.oasis-open.org/cmis/CMIS/v1.1/os/examples/browser/
For atom binding please refer to http://docs.oasis-open.org/cmis/CMIS/v1.1/os/examples/atompub/
Explore our Alfresco products with the links below. Use labels to filter content by product module.