|
@@ -215,7 +215,7 @@ function uploadFile(file: File, store: IStore, token: string): void {
|
215
|
215
|
if (event.lengthComputable) {
|
216
|
216
|
// We use 99% as the max value to avoid showing 100% before the
|
217
|
217
|
// upload is actually finished, that is, when the request is completed.
|
218
|
|
- const percent = Math.max((event.loaded / event.total) * 100, 99);
|
|
218
|
+ const percent = Math.min((event.loaded / event.total) * 100, 99);
|
219
|
219
|
|
220
|
220
|
store.dispatch(updateFileProgress(fileId, percent));
|
221
|
221
|
}
|