Data Table
Upload files and display them in a sortable data table with columns for name, size, type, and status.
What you should see: uploads feeding a sortable table, with each row's status updated from
onComplete and onError as results arrive.| Name | Size | Type | Status |
|---|
Upload files to populate the table
var uploader = CoreUpload.create('#datatable-uploader', {
uploadUrl: '/api/upload/upload',
multiple: true,
autoUpload: true,
onFileAdded: function(file) {
addToDataTable(file);
},
onTaskComplete: function(file) {
updateDataTableStatus(file.name, 'Uploaded');
},
onTaskError: function(file, error) {
updateDataTableStatus(file.name, 'Error');
}
});