mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-15 21:43:03 +03:00
Add image file accept to openapi
(cherry picked from commit 76d66e0dee)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
29 lines
854 B
C#
29 lines
854 B
C#
using System;
|
|
|
|
namespace Jellyfin.Api.Attributes
|
|
{
|
|
/// <summary>
|
|
/// Internal produces image attribute.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Method)]
|
|
public class AcceptsFileAttribute : Attribute
|
|
{
|
|
private readonly string[] _contentTypes;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="AcceptsFileAttribute"/> class.
|
|
/// </summary>
|
|
/// <param name="contentTypes">Content types this endpoint produces.</param>
|
|
public AcceptsFileAttribute(params string[] contentTypes)
|
|
{
|
|
_contentTypes = contentTypes;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the configured content types.
|
|
/// </summary>
|
|
/// <returns>the configured content types.</returns>
|
|
public string[] GetContentTypes() => _contentTypes;
|
|
}
|
|
}
|