You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
550 B
20 lines
550 B
|
2 years ago
|
import { Injectable } from '@angular/core';
|
||
|
|
import { HttpClient, HttpHeaders } from "@angular/common/http";
|
||
|
|
import { Observable } from "rxjs";
|
||
|
|
|
||
|
|
@Injectable({
|
||
|
|
providedIn: 'root'
|
||
|
|
})
|
||
|
|
export class ReplaysService {
|
||
|
|
server_route: string = "http://localhost:3000/"
|
||
|
|
|
||
|
|
constructor(private httpClient: HttpClient) {
|
||
|
|
}
|
||
|
|
|
||
|
|
uploadReplay(newReplay: FormData) {
|
||
|
|
const headers = new HttpHeaders();
|
||
|
|
headers.append('Content-Type', 'multipart/form-data');
|
||
|
|
return this.httpClient.post(this.server_route+'upload/replay', newReplay, { headers });
|
||
|
|
}
|
||
|
|
}
|