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.
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.
Hi Nathaniel,
Try to store a mediaID in Student's table.
Thanks,
Alex
This approach works. Thank you very much Alex
For those interested, I obtained the MediaId of the IMedia object after executing
mediaService.Save()
is working on a reply...