diff options
Diffstat (limited to 'Jellyfin.Api/Controllers/ClientLogController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/ClientLogController.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/ClientLogController.cs b/Jellyfin.Api/Controllers/ClientLogController.cs index b894deb84..9fe3bf731 100644 --- a/Jellyfin.Api/Controllers/ClientLogController.cs +++ b/Jellyfin.Api/Controllers/ClientLogController.cs @@ -1,4 +1,5 @@ -using Jellyfin.Api.Constants; +using System.Threading.Tasks; +using Jellyfin.Api.Constants; using Jellyfin.Api.Models.ClientLogDtos; using MediaBrowser.Controller.ClientEvent; using MediaBrowser.Model.ClientLog; @@ -57,6 +58,20 @@ namespace Jellyfin.Api.Controllers return NoContent(); } + /// <summary> + /// Upload a log file. + /// </summary> + /// <param name="file">The file.</param> + /// <returns>Submission status.</returns> + [HttpPost("File")] + [ProducesResponseType(StatusCodes.Status204NoContent)] + public async Task<ActionResult> LogFile(IFormFile file) + { + await _clientEventLogger.WriteFileAsync(file.FileName, file.OpenReadStream()) + .ConfigureAwait(false); + return NoContent(); + } + private void Log(ClientLogEventDto dto) { _clientEventLogger.Log(new ClientLogEvent( @@ -69,4 +84,4 @@ namespace Jellyfin.Api.Controllers dto.Message)); } } -}
\ No newline at end of file +} |
