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.
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
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?
You can use api-explorer create node api.
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.
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/
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.