|
@@ -941,7 +941,7 @@ export class Uppy<M extends Meta, B extends Body> {
|
|
bytesTotal: size,
|
|
bytesTotal: size,
|
|
uploadComplete: false,
|
|
uploadComplete: false,
|
|
uploadStarted: null,
|
|
uploadStarted: null,
|
|
- } as FileProgressNotStarted,
|
|
|
|
|
|
+ } satisfies FileProgressNotStarted,
|
|
size,
|
|
size,
|
|
isGhost: false,
|
|
isGhost: false,
|
|
isRemote: file.isRemote || false,
|
|
isRemote: file.isRemote || false,
|
|
@@ -1376,6 +1376,8 @@ export class Uppy<M extends Meta, B extends Body> {
|
|
// and click 'ADD MORE FILES', - focus won't activate in Firefox.
|
|
// and click 'ADD MORE FILES', - focus won't activate in Firefox.
|
|
// - We must throttle at around >500ms to avoid performance lags.
|
|
// - We must throttle at around >500ms to avoid performance lags.
|
|
// [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
|
|
// [Practical Check] Firefox, try to upload a big file for a prolonged period of time. Laptop will start to heat up.
|
|
|
|
+ // todo when uploading multiple files, this will cause problems because they share the same throttle,
|
|
|
|
+ // meaning some files might never get their progress reported (eaten up by progress events from other files)
|
|
calculateProgress = throttle(
|
|
calculateProgress = throttle(
|
|
(file, data) => {
|
|
(file, data) => {
|
|
const fileInState = this.getFile(file?.id)
|
|
const fileInState = this.getFile(file?.id)
|
|
@@ -1558,7 +1560,6 @@ export class Uppy<M extends Meta, B extends Body> {
|
|
file.id,
|
|
file.id,
|
|
{
|
|
{
|
|
progress: {
|
|
progress: {
|
|
- progress: 0,
|
|
|
|
uploadStarted: Date.now(),
|
|
uploadStarted: Date.now(),
|
|
uploadComplete: false,
|
|
uploadComplete: false,
|
|
percentage: 0,
|
|
percentage: 0,
|