Guest User

Untitled

a guest
Jul 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. // Initialize the Uploader.
  2. var myUpload = fluid.uploader(".flc-uploader", {
  3. listeners: {
  4. onFileSuccess: function (file, serverData){
  5. // Keep track of what's been added in this go-round so that those
  6. // images can be shown on the next page. (Alternatively, you
  7. // might set up another panel on this page to accumulate thumbnails
  8. // as each file is successfully consumed.)
  9. myUpload.container.append('<input type="hidden" name="imageIds" value="' + serverData + '"/>');
  10. },
  11.  
  12. afterUploadComplete: function () {
  13. if (myUpload.uploadManager.queue.getReadyFiles().length === 0 &&
  14. myUpload.uploadManager.queue.getErroredFiles().length === 0) {
  15. // we're really really done
  16. // display the meta data editing page after a brief delay so that the user can see that the upload is complete
  17. var delay = setTimeout(function(){
  18. myUpload.container.submit();
  19. },2000);
  20. }
  21. }
  22. });
Add Comment
Please, Sign In to add comment