I’m working on a transform where I need to convert and store multiple file types — including PDFs, DOCX, and PPT files — into MediaSets in Foundry. However, I’m running into some issues.
Here is a snippet of my current code for reference:
from transforms.api import transform, Inputfrom transforms.mediasets import MediaSetOutput
@transform(input_dataset=Input(“ri.foundry.main.dataset.xxxx”),output_media_set=MediaSetOutput(“ri.mio.main.media-set.yyyy”,media_set_schema={“schema_type”: “document”,“primary_format”: “pdf”},additional_allowed_input_formats=[“docx”, “ppt”],storage_configuration={“type”: “native”},retention_policy=“forever”,should_snapshot=False,),)def upload_files(input_dataset, output_media_set):output_media_set.set_write_mode(“modify”)output_media_set.put_dataset_files(input_dataset,ignore_items_not_matching_schema=True)
Any suggestions on troubleshooting this issue in code repo? Thanks