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.
Also, take a look at this and see if it helps.
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.