using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
///
/// Batch CRUD, document upload, and assignment for the digitization workflow.
///
[ApiController]
[Route("api/v1/digitization-batches")]
[Produces("application/json")]
[Authorize]
public class DigitizationBatchesController : ControllerBase
{
private readonly IBatchService _batches;
private readonly IDocumentStorageService _storage;
private static readonly HashSet _allowedMimeTypes = new()
{
"application/pdf", "image/jpeg", "image/png"
};
public DigitizationBatchesController(IBatchService batches, IDocumentStorageService storage)
{
_batches = batches;
_storage = storage;
}
///
/// Uploads a scanned document and creates a new digitization batch.
///
[HttpPost]
[Consumes("multipart/form-data")]
[ProducesResponseType(typeof(ApiResponse), StatusCodes.Status201Created)]
[ProducesResponseType(typeof(ApiResponse