Fix header
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-02-02 17:38:34 +01:00
parent bb71c043a1
commit 335078a10c

View File

@ -63,7 +63,7 @@ export class ItemService {
getItemData(code: string,start?:number,size?:number): Observable<ArrayBuffer> { getItemData(code: string,start?:number,size?:number): Observable<ArrayBuffer> {
var headers = new HttpHeaders(); var headers = new HttpHeaders();
if(start && size) headers=headers.set("Range",`bytes=${start}-${size-1}`); if(start !== undefined && size !== undefined) headers=headers.set("Range",`bytes=${start}-${size-1}`);
return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/data`,{ headers: headers,responseType: 'arraybuffer' }); return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${code}/data`,{ headers: headers,responseType: 'arraybuffer' });
} }