diff --git a/js/upload.js b/js/upload.js
index e9b5dc6..9cb7a73 100644
--- a/js/upload.js
+++ b/js/upload.js
@@ -1,14 +1,38 @@
+var previewHtml =
+'
' +
+ '
' +
+ '' +
+ '' +
+ '
' +
+'
';
+
$('#drop').filedrop({
url: 'upload.php',
paramname: 'file',
maxfiles: 4,
maxfilesize: 1,
- uploadFinished: function(i, file, response, time) {
-
+ beforeEach: function(file) {
+ // alert('temp attempting upload') ;
},
- beforeEach: function(file) {
- alert('temp attempting upload') ;
+ uploadStarted: function(i, file, len) {
+ var reader = new FileReader();
+
+ reader.onload = function(e) {
+ alert(e.target.result);
+ $('img',$(previewHtml)).attr('src', e.target.result);
+ }
+
+ reader.readAsDataURL(file);
+ $(previewHtml).appendTo($('#drop'));
+
+ $.data(file, $(previewHtml));l
+ },
+ progressUpdated: function(i, file, progress) {
+ $.data(file).find('.progressBar').width(progress);
+ },
+ uploadFinished: function(i, file, response, time) {
+ $.data(file).addClass('complete');
},
error: function(type, file) {