DanDiplo / Umbraco.MediaDownload

Adds a download option to the Umbraco Media library
4 stars 1 forks source link

Changed to use IMediaFileSystem #2

Closed AaronSadlerUK closed 2 years ago

AaronSadlerUK commented 2 years ago

To make this work on Umbraco Cloud (and possibly other providers) it should be using the IMediaFileSystem to get a stream rather than reading off disk.

The reason being that when using blob storage the server path is not where the file resides.

https://our.umbraco.com/Documentation/Reference/Configuration-for-Umbraco-7-and-8/fileSystemProviders/#get-the-contents-of-a-file-as-a-stream