This repository has been archived on 2023-06-30. You can view files and clone it, but cannot push or open issues or pull requests.
2chBackAPI/Controllers/PictureUpload.cs

20 lines
561 B
C#
Raw Normal View History

2022-11-02 01:45:42 +10:00
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 + " получен!");
}
}
}