upload zip archive from strava

This commit is contained in:
Davide Scaini
2026-04-10 22:26:11 +02:00
parent fc6c00c6eb
commit da622131fd
4 changed files with 77 additions and 1 deletions
+11
View File
@@ -732,6 +732,17 @@ try {
}
};
xhr.onload = () => {
// Fires when the request completes. If we already got a 'done' or 'error'
// SSE event via onprogress the status is already set. If not (e.g. a non-SSE
// error response), surface the failure.
if (xhr.status !== 200) {
zipStatus.textContent = `Upload failed (${xhr.status}).`;
zipStatus.style.color = '#f87171';
zipInput.value = '';
}
};
xhr.onerror = () => {
zipStatus.textContent = 'Upload failed — check your connection.';
zipStatus.style.color = '#f87171';