FancyUpload = new FancyUpload('upload-filedata', {
url: '/ajax/upload.php', // Upload target URL, default is form-action if given, otherwise current page
swf: '/public/swiff.uploader.swf', // Path and filename of the swf file
multiple: true, // Multiple files selection, default: true
types: {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'}, // extensions
limitSize: false, //Maximum size for one added file
limitFiles: false, // Maximum files in the queue, default: false
queueList: 'upload-queue', // The Element or ID for the queue list
uploadTimeout: '6', // upload timeout (sec)
onAllComplete: function() { // Event fired when all files uploaded
// Ajax.Request for upload result
new Ajax.Request('/ajax/upload-result.php', {
mothod: 'POST', onSuccess: function(req) {
setTimeout(function() {
// clear the queue list
FancyUpload.clearList();
}, 1500);
// display the upload result
$('upload-status').innerHTML = req.responseText;
}
});
}
});