Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Initialize the Uploader.
- var myUpload = fluid.uploader(".flc-uploader", {
- listeners: {
- onFileSuccess: function (file, serverData){
- // Keep track of what's been added in this go-round so that those
- // images can be shown on the next page. (Alternatively, you
- // might set up another panel on this page to accumulate thumbnails
- // as each file is successfully consumed.)
- myUpload.container.append('<input type="hidden" name="imageIds" value="' + serverData + '"/>');
- },
- afterUploadComplete: function () {
- if (myUpload.uploadManager.queue.getReadyFiles().length === 0 &&
- myUpload.uploadManager.queue.getErroredFiles().length === 0) {
- // we're really really done
- // display the meta data editing page after a brief delay so that the user can see that the upload is complete
- var delay = setTimeout(function(){
- myUpload.container.submit();
- },2000);
- }
- }
- });
Add Comment
Please, Sign In to add comment