upload zip archive from strava
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user