-1

I'm using Angular 13 with PrimeNG 13. I want to allow a file upload in my form so I have created

  <p-fileUpload [maxFileSize]="1000000" [customUpload]="true" [multiple]="false" formControlName="myFile"></p-fileUpload>
                    

This creates a single file dialog with "Choose", "Upload" and "Cancel" buttons. It seems that after choosing a file, I must then click "Upload" to get the file into my form.

Is there a way to create the component so that it only allows for upload of a single file and that initially choosing the file adds it into my form?

Dave
  • 15,639
  • 133
  • 442
  • 830

1 Answers1

-1

According to documentation you should add below properties:

mode="basic" 
[auto]="true"
Fseee
  • 2,476
  • 9
  • 40
  • 63