Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (49 sloc) 1.22 KB
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
namespace LatestBlazor
{
[DisableRequestSizeLimit]
public partial class UploadController : Controller
{
[HttpPost("upload/single")]
public IActionResult Single(IFormFile file)
{
try
{
// Put your code here
return StatusCode(200);
}
catch (Exception ex)
{
return StatusCode(500, ex.Message);
}
}
[HttpPost("upload/multiple")]
public IActionResult Multiple(IFormFile[] files)
{
try
{
// Put your code here
return StatusCode(200);
}
catch (Exception ex)
{
return StatusCode(500, ex.Message);
}
}
[HttpPost("upload/{id}")]
public IActionResult Post(IFormFile[] files, int id)
{
try
{
// Put your code here
return StatusCode(200);
}
catch (Exception ex)
{
return StatusCode(500, ex.Message);
}
}
}
}
You can’t perform that action at this time.