File uploading in all its glory
The FileUpload component provides a file upload mechanism with enhanced features compared to the basic HTML <input type="file">
file upload definition. The component provides an HTML5-powered UI with capabilities such as drag and drop, uploading multiple files, progress tracking, validations, and more.
Note
File uploading component works in all modern browsers as well as IE 10 and higher.
Basic, multiple, and automatic file uploading
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...