Copied to clipboard

Flag this post as spam?

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


  • Nathaniel 5 posts 85 karma points
    Aug 01, 2021 @ 11:51
    Nathaniel
    0

    Linking File Uploaded from MediaService to a record from Custom Table

    Hello everyone, Hope you'll are having a good day/ night.

    I have a custom table, say for example a Student Table. Each Student will have an image. However this Image will be uploaded using the MediaService available in Umbraco.

    Is there a way I can link the Student record with the file uploaded from MediaService.

    Note: These students are imported some custom code which is implemented in the backoffice.

  • Alex Skrypnyk 6048 posts 23038 karma points MVP 5x admin c-trib
    Aug 01, 2021 @ 13:51
    Alex Skrypnyk
    100

    Hi Nathaniel,

    Try to store a mediaID in Student's table.

    Thanks,

    Alex

  • Nathaniel 5 posts 85 karma points
    Aug 10, 2021 @ 10:24
    Nathaniel
    0

    This approach works. Thank you very much Alex

    For those interested, I obtained the MediaId of the IMedia object after executing mediaService.Save()

Please Sign in or register to post replies

Write your reply to:

Draft