Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andy Boot 30 posts 150 karma points
    Oct 18, 2023 @ 14:52
    Andy Boot
    0

    Parsing a MediaPicker3 raw value as MediaWithCrops

    I've got the following raw value stored within a field of a custom table which is being set with a MediaPicker3 data type (using Konstrukt):

    [{"key":"71d880eb-ccfb-4ece-9bbf-11a8f0f4fdb4","mediaKey":"f7b0e697-ddb7-4e80-bad9-c43365386a62","crops":[{"alias":"desktopListing","label":"Desktop Listing","coordinates":{"x1":0,"y1":0,"x2":0.47762191048764185,"y2":0}}]}]
    

    For the life of me I cannot work out how to parse this value to a MediaWithCrops object. I can use the mediaKey to return the item from the media library and parse as IPublishedContent, but this isn't going to work for when I want to make use of crops within a view.

    If anybody has come across this before and can point me in the right direction it would be most appreciated.

    Thanks, Andy

Please Sign in or register to post replies

Write your reply to:

Draft