Skip to content

Commit

Permalink
fix: enable HEAD for v3 file stream endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Dec 19, 2023
1 parent bf6cbc8 commit ad0cb31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Shoko.Server/API/v3/Controllers/FileController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ public ActionResult RescanFileByAniDBFileID([FromRoute] int anidbFileID, [FromQu
/// <returns>A file stream for the specified file.</returns>
[AllowAnonymous]
[HttpGet("{fileID}/Stream")]
[HttpHead("{fileID}/Stream")]
[HttpGet("{fileID}/StreamDirectory/{filename}")]
[HttpHead("{fileID}/StreamDirectory/{filename}")]
public ActionResult GetFileStream([FromRoute] int fileID, [FromRoute] string filename = null, [FromQuery] bool streamPositionScrobbling = false)
{
var file = RepoFactory.VideoLocal.GetByID(fileID);
Expand Down

0 comments on commit ad0cb31

Please sign in to comment.