Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete event is not fired if one or more files are removed before they are uploaded using XHRUpload #5366

Open
2 tasks done
Eleana92 opened this issue Jul 24, 2024 · 3 comments
Labels

Comments

@Eleana92
Copy link

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Try to upload a large amount of files and remove one or more files from the end of the queue that have not been uploaded yet.

    const uppy = Uppy(
        {
            autoProceed: true,
            debug: true
        }
    ).use(Dashboard,
        {
            inline: true,
            target: '#uppy',
            hideUploadButton: true,
            hideRetryButton: true,
            hidePauseResumeButton: true,
            hideCancelButton: true,
            proudlyDisplayPoweredByUppy: false,
            disableThumbnailGenerator: true,
            showRemoveButtonAfterComplete: true
        })
        .use(XHRUpload, {
            endpoint: 'https://your-domain.com/upload',
            fieldName: 'file'
        });

    uppy.on('complete', (result) => {
        console.log('complete');
        console.log('successful files:', result.successful);
        console.log('failed files:', result.failed);
    });

Expected behavior

The complete event should be fired after the remaining files have been uploaded.

Actual behavior

The complete event is not called in this case, although the upload is normally executed and there is feedback that it is successfully complete in the UI.
dashboard
If one or more files are removed AFTER they have been uploaded, the event is executed as expected.

@Eleana92 Eleana92 added the Bug label Jul 24, 2024
@BluesYoung-web
Copy link

I also encountered the same bug.

@Murderlon
Copy link
Member

Hi, I tried multiple times and with exactly your options but I can't reproduce this.

@Eleana92
Copy link
Author

Hi, I tried multiple times and with exactly your options but I can't reproduce this.

I created a minimal project in php for demonstration, if you would like to try it.
I added some delay between uploads so a huge amount of files is not necessary to test it.

Uppy.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants