I want to select the files first and then to start upload those files by an another button instead of component's own Upload
button.
How can I do this?
Example code what I've tried:
<button pButton type="button" label="Start Upload"
(click)="startUpload()"></button>
<p-fileUpload #fileInput name="fileIcon"
url="rest/batch/file/multimedia/"></p-fileUpload>
@ViewChild('fileInput') fileInput:ElementRef;
constructor( private renderer: Renderer ) { }
startUpload(){
// this.fileInput.upload(); -> doesn't compile, undefined
// this.fileInput.nativeElement.upload(); -> this.fileInput.nativeElement is undefined
?????????????????
}