[HttpPost("{petShortId}"), DisableRequestSizeLimit]
public async Task<IActionResult> UploadVideo(int petShortId,
IFormFile video,
CancellationToken cancellationToken)
{
var petShort = await _petShortsRepository.FindByIdAsync(petShortId, cancellationToken);
if (petShort == null)
return NotFound("Not Found This Short");
var petaverMediaDTO = await _petShortService.UploadPetShortVideo(petShort,
video,
_azureStorageConfig.CurrentValue.PetaversePetVideos,
cancellationToken);
return petaverMediaDTO is null
? BadRequest("Can't save petshort video")
: Ok(petaverMediaDTO);
}
[HttpPost("{petShortId}"), DisableRequestSizeLimit]
public async Task<IActionResult> UploadVideo(int petShortId,
IFormFile video,
CancellationToken cancellationToken)
{
var petShort = await _petShortsRepository.FindByIdAsync(petShortId, cancellationToken);
if (petShort == null)
return NotFound("Not Found This Short");
var petaverMediaDTO = await _petShortService.UploadPetShortVideo(petShort,
video,
_azureStorageConfig.CurrentValue.PetaversePetVideos,
cancellationToken);
return petaverMediaDTO is null
? BadRequest("Can't save petshort video")
: Ok(petaverMediaDTO);
}