diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs
index 326d450c93..af449d7cfa 100644
--- a/src/Umbraco.Core/Services/FileService.cs
+++ b/src/Umbraco.Core/Services/FileService.cs
@@ -858,6 +858,22 @@ namespace Umbraco.Core.Services
}
}
+ public Stream GetPartialViewFileContentStream(string filepath)
+ {
+ using (var repository = GetPartialViewRepository(PartialViewType.PartialView, UowProvider.GetUnitOfWork()))
+ {
+ return repository.GetFileContentStream(filepath);
+ }
+ }
+
+ public void SetPartialViewFileContent(string filepath, Stream content)
+ {
+ using (var repository = GetPartialViewRepository(PartialViewType.PartialView, UowProvider.GetUnitOfWork()))
+ {
+ repository.SetFileContent(filepath, content);
+ }
+ }
+
#endregion
private void Audit(AuditType type, string message, int userId, int objectId)
diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs
index 03ebdac029..5fa078e79b 100644
--- a/src/Umbraco.Core/Services/IFileService.cs
+++ b/src/Umbraco.Core/Services/IFileService.cs
@@ -293,5 +293,19 @@ namespace Umbraco.Core.Services
/// The filesystem path to the macro partial view.
/// The content of the macro partial view.
void SetPartialViewMacroFileContent(string filepath, Stream content);
+
+ ///
+ /// Gets the content of a partial view as a stream.
+ ///
+ /// The filesystem path to the partial view.
+ /// The content of the partial view.
+ Stream GetPartialViewFileContentStream(string filepath);
+
+ ///
+ /// Sets the content of a partial view.
+ ///
+ /// The filesystem path to the partial view.
+ /// The content of the partial view.
+ void SetPartialViewFileContent(string filepath, Stream content);
}
}
\ No newline at end of file