diff --git a/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts b/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts index cf13ee2..5b3c179 100644 --- a/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts +++ b/projects/common/src/lib/components/resumable-file-upload/resumable-file-upload.service.ts @@ -2,7 +2,7 @@ import { Injectable, OnDestroy } from '@angular/core'; import { OAuthService } from 'angular-oauth2-oidc'; import { Subject , Subscription } from 'rxjs'; 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'; @@ -83,11 +83,10 @@ export class ResumableFileUploadService implements OnDestroy{ this.refresh.next({}); } - addFiles = (files: any[], event: any, geoRefJson?: string, attributes?: any) => { + addFiles = (files: any[], event: any, metadata:any) => { for (let f of files) { - this.uploadService.handleFile(f); - // if (geoRefJson) f.geoRefJson = geoRefJson; - // if (attributes) f.attributes = JSON.stringify(attributes); + var options:UploadxOptions = {metadata:metadata}; + this.uploadService.handleFile(f,options); } }