diff --git a/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts b/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts index d0bdec922a..479e569c22 100644 --- a/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts +++ b/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts @@ -41,7 +41,9 @@ export class PoUploadBaseService { const filesLength = files.length; const uploadEvent: any = { data: {}, - file: null + file: null, + url: url, + headers: headers }; for (let i = 0; i < filesLength; i++) { @@ -57,6 +59,8 @@ export class PoUploadBaseService { tOnUpload.emit(uploadEvent); formData.append('data', JSON.stringify(uploadEvent.data)); + url = uploadEvent.url; + headers = uploadEvent.headers; } this.sendFile(url, file, headers, formData, uploadCallback, successCallback, errorCallback);