multimodalart HF Staff commited on
Commit
11dbcb7
·
1 Parent(s): 4284200

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +4 -4
index.html CHANGED
@@ -44,6 +44,8 @@
44
 
45
  window.fetch = function(url, init) {
46
  if (typeof url === 'string' && init && init.method === 'PUT') {
 
 
47
  uploadStartTime = uploadStartTime || Date.now();
48
  return new Promise((resolve, reject) => {
49
  const xhr = new XMLHttpRequest();
@@ -71,10 +73,8 @@
71
  const progress = uploadedBytes / totalSize; // Use the known total size
72
  const progressBar = document.getElementById('progressBar');
73
  progressBar.value = progress * 100;
74
-
75
  const speedDiv = document.getElementById('uploadSpeed');
76
- const processingMessage = document.getElementById('processingMessage');
77
-
78
  if (progress < 1) { // If upload is not yet finished
79
  const elapsedTime = (Date.now() - uploadStartTime) / 1000; // in seconds
80
  const speed = uploadedBytes / elapsedTime; // in bytes per second
@@ -135,7 +135,7 @@
135
  return; // stop if other errors occur during repository creation
136
  }
137
  }
138
-
139
  try {
140
  // upload files
141
  await uploadFiles({
 
44
 
45
  window.fetch = function(url, init) {
46
  if (typeof url === 'string' && init && init.method === 'PUT') {
47
+ const processingMessage = document.getElementById('processingMessage');
48
+ processingMessage.textContent = "Uploading...";
49
  uploadStartTime = uploadStartTime || Date.now();
50
  return new Promise((resolve, reject) => {
51
  const xhr = new XMLHttpRequest();
 
73
  const progress = uploadedBytes / totalSize; // Use the known total size
74
  const progressBar = document.getElementById('progressBar');
75
  progressBar.value = progress * 100;
 
76
  const speedDiv = document.getElementById('uploadSpeed');
77
+
 
78
  if (progress < 1) { // If upload is not yet finished
79
  const elapsedTime = (Date.now() - uploadStartTime) / 1000; // in seconds
80
  const speed = uploadedBytes / elapsedTime; // in bytes per second
 
135
  return; // stop if other errors occur during repository creation
136
  }
137
  }
138
+ processingMessage.textContent = "Uploading...";
139
  try {
140
  // upload files
141
  await uploadFiles({