Picture Upload beta
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
RakVhalate 2022-11-02 01:49:58 +10:00
parent 9feb89cac0
commit 735ec0f76d

View File

@ -11,7 +11,7 @@ export class ApiChatService {
} }
getPosts(): Observable<SinglePost[]> { getPosts(): Observable<SinglePost[]> {
console.log("Получаю посты"); console.log("Получаю посты и картинки");
return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/'); return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/');
//return this.http.get<SinglePost[]>('http://localhost:7141/List/'); //return this.http.get<SinglePost[]>('http://localhost:7141/List/');
} }
@ -25,14 +25,15 @@ export class ApiChatService {
Text: text, Text: text,
Picture: text Picture: text
} }
//return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend) 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://localhost:7141/PostTo', postToSend)
} }
sendpic(picToSend: File) { sendpic(picToSend: File) {
const PostPicture = new FormData(); const PostPicture = new FormData();
PostPicture.append('PostPicture', picToSend); 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)
} }
} }