How to read a media file to stream in Umbraco Cloud

Hi guys,

I need to read the contents of media files via a stream. The code I have works locally but it keeps throwing errors when I run it on Cloud.

I presume there is some environment-agnostic service that I can inject and consume, but I can’t seem to find any documentation anywhere.

Is anybody able to shed any light?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/110427-how-to-read-a-media-file-to-stream-in-umbraco-cloud