Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
How to create/upload representation through API?
If the file exists serve side or is accessible by the server you can use Java api to create new application data then add it to a content holder, in this case a representation.
To upload from client side would need some additional cusotmisation of the UI to add a button to open the file browser etc etc
Hello @TT_9345405
I would start to study how a AfterLoader works.
You can check the source code and learn how to add a additional files to a representation.
During a changing name the file is stored again to a representation.
From that point you can create new representation by general API to store a new object, and then attach a file as primary representation content (ContentRoleType.PRODUCT_VIEW_ED).
https://www.ptc.com/en/support/article/cs252900
PetrH