cancel
Showing results for 
Search instead for 
Did you mean: 

Upload file to alfresco using java spring boot

Dushan
Champ on-the-rise
Champ on-the-rise

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.

11 REPLIES 11

kerkhofsd
Confirmed Champ
Confirmed Champ

I'm a bit surprised almost all replies propose an upload through CMIS here. (Only @jpotts shortly mentions the possibility to use the REST API.)

Isn't Alfresco promoting the public REST API as primary integration point?

For reference: Alfresco's REST API which could also be used to perform the upload of your document:  
https://api-explorer.alfresco.com/api-explorer/#/nodes

jpotts
World-Class Innovator
World-Class Innovator

I suspect the replies propose using CMIS because it is easier in this case. You are already in Java. OpenCMIS gives you a nice library to work with Java objects. Why go to the trouble of using the REST API? Plus, the OP wants to create documents, which is right in the CMIS wheelhouse.

Alfresco is promoting the use of the REST API primarily from remote, non-Java clients, such as a JavaScript front-end.

Either way you choose it doesn't matter--the nice thing is that developer's have options. Use what comes natural for you and the project.