cancel
Showing results for 
Search instead for 
Did you mean: 

Upload & Download large files to and from the repository

aelrwiny
Champ in-the-making
Champ in-the-making
I have large files to be uploaded and downloaded to and from the repository, Is there any any way in Alfresco to do that instead of converting them to array of bytes?
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

I don't quite understand the question / necessity to handle download / uploads manually. There are already good upload / download handlers / web scripts in Alfresco out of the box.
In regards to the core of your question: No matter how you work with files, all methods deal with arrays of bytes, because that is what files ultimately are - streams of bytes. You can use the standard Input-/OutputStream abstractions via the ContentReader/ContentWriter interfaces of Alfresco to stream the bytes without you having to handle arrays of bytes yourself. Of course this requires you have a streamable input / output in the request you are processing. When using HTTP (via Servlet or Web Script) you have the Input-/OutputStream of the HTTP request.

Regards
Axel