diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6f3b2a75f..b34f8929ee4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added information to export CVAT_HOST when performing local installation for accessing over network () - Fixed possible color collisions in the generated colormap () - Original pdf file is deleted when using share() +- Fixed task data upload progressbar() ### Security - Updated ELK to 6.8.22 which uses log4j 2.17.0 () diff --git a/cvat-core/src/server-proxy.js b/cvat-core/src/server-proxy.js index ec6e0204db1..40786a634eb 100644 --- a/cvat-core/src/server-proxy.js +++ b/cvat-core/src/server-proxy.js @@ -840,8 +840,8 @@ }, onProgress(bytesUploaded) { const currentUploadedSize = totalSentSize + bytesUploaded; - const percentage = ((currentUploadedSize / totalSize) * 100).toFixed(2); - onUpdate(`The data are being uploaded to the server ${percentage}%`); + const percentage = currentUploadedSize / totalSize; + onUpdate('The data are being uploaded to the server', percentage); }, onSuccess() { totalSentSize += file.size; @@ -869,8 +869,8 @@ for (const [idx, element] of fileBulks[currentChunkNumber].files.entries()) { taskData.append(`client_files[${idx}]`, element); } - onUpdate(`The data are being uploaded to the server - ${((totalSentSize / totalSize) * 100).toFixed(2)}%`); + const percentage = totalSentSize / totalSize; + onUpdate('The data are being uploaded to the server', percentage); await Axios.post(`${backendAPI}/tasks/${taskId}/data`, taskData, { ...params, proxy: config.proxy,