Is there a way to customize the file upload process using a separate button instead of the component's default Upload
button?
If so, how can I achieve this in my code?
Here is an example of what I've attempted:
<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
?????????????????
}