I am trying to upload an excel document or image to Alfresco community from Java using a Base64 encoded string. While I can upload the document, Alfresco is not able to preview it and when I download the content and attempt to view it. I get a response saying the document is corrupted. So far, I have issues uploading excels and images. I have not tried .doc or .docx. I don't have this issue with text documents(.txt) those behave normally. Would someone kindly assist or provide an example?
The first question I have is: Can you successfully upload those same files using the Share UI? If you can, and preview is working, and you can download the file in an un-corrupted state then it must be your code. Without seeing your code we can only make guesses. My first guess would be that you didn't close a stream or something like that.