changeset 3159:4cfed5c2eacd

added debug info for Orthanc issue #1
author Alain Mazy <alain@mazy.be>
date Thu, 24 Jan 2019 10:54:47 +0100
parents b311cff247ca
children fc9a4a2dad63
files OrthancExplorer/file-upload.js
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancExplorer/file-upload.js	Thu Jan 10 11:19:39 2019 +0100
+++ b/OrthancExplorer/file-upload.js	Thu Jan 24 10:54:47 2019 +0100
@@ -1,8 +1,15 @@
 var pendingUploads = [];
 var currentUpload = 0;
 var totalUpload = 0;
+var alreadyInitialized = false; // trying to debug Orthanc issue #1
 
 $(document).ready(function() {
+  if (alreadyInitialized) {
+    console.log("Orthanc issue #1: the fileupload has been initialized twice !");
+  } else {
+    alreadyInitialized = true;
+  }
+  
   // Initialize the jQuery File Upload widget:
   $('#fileupload').fileupload({
     //dataType: 'json',
@@ -27,7 +34,7 @@
       $('#progress .label').text('Failure');
     })
     .bind('fileuploaddrop', function (e, data) {
-      console.log("dropped " + data.files.length + " files");
+      console.log("dropped " + data.files.length + " files: ", data);
       appendFilesToUploadList(data.files);
     })
     .bind('fileuploadsend', function (e, data) {