public async Task <ActionResult <IEnumerable <string> > > Upload([FromForm] IEnumerable <IFormFile> files) { try { if (files == null || !files.Any()) { return(BadRequest()); } var names = await _imagesManager.UploadAsync(files); return(CreatedAtAction(nameof(Download), new { name = names.First() }, names)); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error uploading image(s)")); } }