TackleMcClean 🏅
02/20/2025, 4:30 PMMike Chambers
02/20/2025, 5:21 PM_mediaFileManager
to abstract away having to work out and deal with what filesystem infrastructure is in place.
source here might give you pointers fo using the mediaFileManager to do your heavy lifting..
https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.csTackleMcClean 🏅
02/20/2025, 6:33 PMMike Chambers
02/20/2025, 7:10 PMJason
02/20/2025, 8:14 PMTackleMcClean 🏅
02/21/2025, 8:08 AMTackleMcClean 🏅
02/21/2025, 1:38 PMJemayn
02/21/2025, 1:48 PMcsharp
var mediaFileSystem = _mediaFileManager.FileSystem;
var fileStream = mediaFileSystem.OpenFile(filePath);
This will ensure that you can get the file based on the media file system - which means it will work both for blob storage and a physical filesystemTackleMcClean 🏅
02/21/2025, 1:49 PM