public async Task <IActionResult> Download(string baseUrl, int quality = -1) { if (baseUrl == null) { return(new BadRequestObjectResult("Please pass a url in the request body")); } if (quality == -1) { return(new BadRequestObjectResult("Please pass a quality in the request body")); } byte[] fileBytes = await videoDownloader.DownloadMedia(baseUrl, quality); return((ActionResult) new OkObjectResult(fileBytes)); }