Compare commits
No commits in common. "3f580831a184da51f7631b37a315cc4803b389b6" and "10b089091585b363d2cf227a688da611f5870b5d" have entirely different histories.
3f580831a1
...
10b0890915
@ -1,19 +0,0 @@
|
||||
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 + " получен!");
|
||||
}
|
||||
}
|
||||
}
|
@ -46,7 +46,7 @@ namespace NeDvachAPI
|
||||
using ( var command = new NpgsqlCommand(@"
|
||||
SELECT * FROM
|
||||
(
|
||||
SELECT post_id, post, post_timestamp, post_pic
|
||||
SELECT post_id, post, post_timestamp
|
||||
FROM dvach
|
||||
ORDER BY post_id DESC
|
||||
) subquery
|
||||
@ -65,17 +65,10 @@ namespace NeDvachAPI
|
||||
//);
|
||||
Post receivedPost = new()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
Id = reader.GetInt32(0),
|
||||
Text = reader.GetString(1),
|
||||
Timestamp = reader.GetString(2),
|
||||
ImgURL = (string)reader.GetString(3)
|
||||
=======
|
||||
//Date = DateTime.Now,
|
||||
Id = reader.GetInt32(0),
|
||||
Text = reader.GetString(1),
|
||||
Timestamp = reader.GetString(2)
|
||||
>>>>>>> 10b089091585b363d2cf227a688da611f5870b5d
|
||||
};
|
||||
posts.Add(receivedPost);
|
||||
//posts[postCount] = receivedPost;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderID>MvcControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user