Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi.
I have data presented by outputstream or byte array (data contains excel file).
How can i replace primary content of WTDocument by this new file?
Should i use ContentServerHelper.service.updatePrimary method? How to create ApplicationData instance from my data?
Thanks.
I am using this code now:
ContentHolder refreshedContentHolder = ContentHelper.service.getContents(document);
ContentItem contentItem = ContentHelper.getPrimary((FormatContentHolder) refreshedContentHolder);
ContentHolderHelper.deleteContents(document, contentItem);
ContentHolderHelper.setContents(document, byteArray, ContentRoleType.PRIMARY, "name", "", false);