jQuery File Upload widget with progress bar, upload speed, elapsed & remaining time for jQuery.
- Add assuploader.css to your head
- Add HTML DIV element with id "assuploader"
- Add jQuery Reference
- Add assuploader.js reference
- Now Initialize the AssUploader Plugin
$(document).ready(function(){ if($("#assuploader").size()>0){ $("#assuploader").assuploader({ formats: 'all', // Set to all or in an array like ['jpg','png','bmp'] to restrict to specific file formats maxsize: 2, // in MBs uploadpath: './files/', // Absolute Upload Directory Path uploadurl : 'assuploader.php', // Absolute path to assuploader.php file should not be on any other domain completeCallback: function(){}, // On Upload Complete Call back function errorCallback: function(){}, // on error call back function title: 'AssUploader' // Your Ass Upload Box Title }); } });
Here you go...
by: Kamran Wajdani