From f93cfddfd0fe0f6e78a8a27e05889d35db8a0dd4 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sun, 31 May 2026 18:55:05 +0200 Subject: [PATCH 1/1] Fixed error message occuring on classic upload Changed handling of XHR responses --- lib/functions.js.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.js.php b/lib/functions.js.php index 3574891..cafecaf 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -430,9 +430,9 @@ function classic_upload (file, time, password, one_time) req.upload.addEventListener ("progress", upload_progress, false); req.addEventListener ("error", XHRErrorHandler, false); req.addEventListener ("abort", XHRErrorHandler, false); - req.onreadystatechange = function () + req.onload = function () { - if (req.readyState == 4 && req.status == 200) + if (req.status === 200) { var res = req.responseText; -- 2.43.0