temp
This commit is contained in:
@@ -32,21 +32,14 @@ namespace BeWo.Data.Access
|
||||
return Path.Combine(_rootPath, filePath);
|
||||
}
|
||||
|
||||
public async Task SaveLogAsync(string pFileName, Stream content, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var lFilePath = Path.Combine("logs", pFileName);
|
||||
|
||||
await SaveFileAsync(lFilePath, pFileName, content, cancellationToken).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
private async Task SaveFileAsync(string pFilePath, string pFileName, Stream content, CancellationToken cancellationToken = default)
|
||||
{
|
||||
// Prüfe Namen
|
||||
if (SecurityUtils.ContainsInvalidFilenameChars(pFileName))
|
||||
throw new BeWoInvalidOperationException(AppError.LocalFileStorageFileNameInvalidChar);
|
||||
throw new BeWoInvalidOperationException(AppError.FileNameInvalidChar);
|
||||
|
||||
if (Path.GetFileName(pFilePath) != pFileName)
|
||||
throw new BeWoInvalidOperationException(AppError.LocalFileStorageFileNameNotEqFilePath);
|
||||
throw new BeWoInvalidOperationException(AppError.FileNameNotEqFilePath);
|
||||
|
||||
// Erstelle File Ordner
|
||||
var path = GetFilePath(pFilePath);
|
||||
|
||||
Reference in New Issue
Block a user