A media library interface for a content management system. Upload images and
documents, then browse them in a grid with file type icons.
AjaxUploader.create(el, {
uploadUrl: '/ajaxupload.axd/upload',
multiple: true,
autoUpload: true,
onComplete: function (file) {
var ext = file.name.split('.').pop().toLowerCase();
var icon = isImage(ext) ? 'image-icon' : 'doc-icon';
mediaGrid.appendChild(createMediaItem(icon, file.name));
}
});