Hi, I'm new to Alfresco. I have a simple report generation using jasper and that document(pdf) is currently save to "public" folder in my project. My task is to save my report to alfresco document manager.
I'm using alfresco 6.1.
Can someone please guide me on this. I read several blogs and i dont have a clear idea on how to do above task.
Thank you.
Hope this helps:
https://github.com/aborroy/cmis-associations-alfresco
This project is creating associations, but it can be used as template for your requirement.
thanks a lot for the reply. I'll go though that.
Can you provide a simple guidline to upload a file to alfresco using java. My alfresco version is 6.1.
I tried several blogs. But i can find CMIS in alfresco 6.1. Some have mentioned that it will start with alfresco and i'm not getting a clear idea.
Can you give a clear guidance on how to upload a file using alfresco 6.1 in java.
Thank you
thanks a lot for replying so quicky. Much appreciated. I'll go through that document and let you know.
You can use the following OOTB APIs in order to upload a document from your java application to Alfresco.
1. Authentication - http://localhost:8080/alfresco/api/s/login
2. Upload document - http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/{nodeId}/children
You will need to pass the authentication ticket in upload document API.
Please refer the following link for the response and body required to pass:
https://api-explorer.alfresco.com/api-explorer/#/
Thanks,
Kintu
In the document you provided, when we grab the session, we provide username, password, ATOMPUB_URL. In here what is username ? is this the admin of my alfresco user or any user in alfresco ?
And what should i provide for ATOMPUB_URL ? In a stack overflow asnwer i saw a url like this >
"http://127.0.0.1:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom"
What should i use for atompub_url with alfresco 6.1 ?
i'll go through this and let you know. Thank you for replying to me.
hi, I tried to authenticate it by typing this url >
"http://localhost:8080/alfresco/api/s/login?u=myUSER&pw=myPW"
And i am not getting a token. I only get a blank response body. It has nothing in it. Btw i provided my admin username and password.
Answering your question about the CMIS URL, yes, what you found is the correct CMIS service URL. Yes, just use any username and password that has access to the folder in Alfresco you are trying to write to.
CMIS will be easier to use than the Alfresco REST API for this, in my opinion, but either one can be used.
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.