Two properties are required in order to be able to work with the file upload--the name of the request parameter to identify the uploaded files at backend and the remote URL to upload files. For example:
<p-fileUpload name="demofiles[]" url="http://demoserver.com/upload">
</p-fileUpload>
The component presents itself as a panel with three buttons: Choose, Upload, Cancel, and a content section with selected files. The Choose button displays a file dialog to select one or multiple files. Once selected, the files can be uploaded or canceled by the next two buttons, respectively. Filename and size are always shown by default. In addition, for images, you will see a preview as well:
File upload also provides a simpler UI with just one button Choose and without the content section. You can activate this UI by setting the mode attribute...