Contents attribute cannot be changed directly. The contents of FileDocuments are maintained by Mendix built in file handling features.
There are also a number of Java actions in community commons module that enable you to change or manipulate the contents of a file.
What are you trying to accomplish?
I’m trying to create a pdf file in a Microflow, and on that same microflow, I want to create an object (the “Sharepoint Document”), and put that pdf “inside” that “newSharePoint” object). Does it make sense?
Thanks for your help!