|
|
|
@ -45,7 +45,7 @@ namespace MediaBrowser.Controller.ClientEvent
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public async Task<string> WriteDocumentAsync(string clientName, string clientVersion, Stream fileContents)
|
|
|
|
|
{
|
|
|
|
|
var fileName = $"upload_{clientName}_{clientVersion}_{DateTime.UtcNow:yyyyMMddHHmmss}.log";
|
|
|
|
|
var fileName = $"upload_{clientName}_{clientVersion}_{DateTime.UtcNow:yyyyMMddHHmmss}_{Guid.NewGuid():N}.log";
|
|
|
|
|
var logFilePath = Path.Combine(_applicationPaths.LogDirectoryPath, fileName);
|
|
|
|
|
await using var fileStream = new FileStream(logFilePath, FileMode.CreateNew, FileAccess.Write, FileShare.None);
|
|
|
|
|
await fileContents.CopyToAsync(fileStream).ConfigureAwait(false);
|
|
|
|
|