Add metadata to addfiles method
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2019-07-19 14:28:54 +02:00
parent 62570f3d81
commit 8c1b7ccf55

View File

@ -2,7 +2,7 @@ import { Injectable, OnDestroy } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc'; import { OAuthService } from 'angular-oauth2-oidc';
import { Subject , Subscription } from 'rxjs'; import { Subject , Subscription } from 'rxjs';
import { HttpClient } from "@angular/common/http"; import { HttpClient } from "@angular/common/http";
import { UploadxService, UploadState} from 'ngx-uploadx'; import { UploadxService, UploadState,UploadxOptions} from 'ngx-uploadx';
import { AppConfig } from '../../shared/app.config'; import { AppConfig } from '../../shared/app.config';
@ -83,11 +83,10 @@ export class ResumableFileUploadService implements OnDestroy{
this.refresh.next({}); this.refresh.next({});
} }
addFiles = (files: any[], event: any, geoRefJson?: string, attributes?: any) => { addFiles = (files: any[], event: any, metadata:any) => {
for (let f of files) { for (let f of files) {
this.uploadService.handleFile(f); var options:UploadxOptions = {metadata:metadata};
// if (geoRefJson) f.geoRefJson = geoRefJson; this.uploadService.handleFile(f,options);
// if (attributes) f.attributes = JSON.stringify(attributes);
} }
} }