From 735ec0f76d7669ea6df11977dda752c21a9d43d7 Mon Sep 17 00:00:00 2001 From: RakVhalate Date: Wed, 2 Nov 2022 01:49:58 +1000 Subject: [PATCH] Picture Upload beta --- src/app/services/api-chat.service.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/services/api-chat.service.ts b/src/app/services/api-chat.service.ts index 77213ab..ebbf680 100644 --- a/src/app/services/api-chat.service.ts +++ b/src/app/services/api-chat.service.ts @@ -11,7 +11,7 @@ export class ApiChatService { } getPosts(): Observable { - console.log("Получаю посты"); + console.log("Получаю посты и картинки"); return this.http.get('http://api.vdk2ch.ru:5000/List/'); //return this.http.get('http://localhost:7141/List/'); } @@ -25,14 +25,15 @@ export class ApiChatService { Text: text, Picture: text } - //return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend) - return this.http.post('http://localhost:7141/PostTo', postToSend) + return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend) + //return this.http.post('http://localhost:7141/PostTo', postToSend) } sendpic(picToSend: File) { const PostPicture = new FormData(); PostPicture.append('PostPicture', picToSend); - return this.http.post('http://localhost:7141/UploadPic', PostPicture) + //return this.http.post('http://localhost:7141/UploadPic', PostPicture) + return this.http.post('http://api.vdk2ch.ru:5000/UploadPic', PostPicture) } }