20 lines
561 B
C#
20 lines
561 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using System.Net.Http.Headers;
|
|
using System.Text.Json;
|
|
|
|
namespace NeDvachAPI.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
public class UploadPic : ControllerBase
|
|
{
|
|
[HttpPost(Name = "UploadPicture")]
|
|
public JsonResult ReceivePost([FromForm] IFormFile PostPicture)
|
|
{
|
|
Console.Write("Принята картинка ");
|
|
Console.WriteLine(PostPicture.FileName);
|
|
return new JsonResult(PostPicture.FileName + " получен!");
|
|
}
|
|
}
|
|
}
|