Skip to content

When uploading multiple files and one fails, ContentExplorer does not call upload listener #3374

@mremigio

Description

@mremigio

If you are a Box employee, you do not need to create an issue to open a pull request

Please fill out the following template so we can reproduce and fix your issue as quickly as possible!

Note: if your issue includes a potential security vulnerability, please do not file it here. Instead, email the issue to [email protected] for support.

Note: if your issue involves previewing files, please report the issue here.

Environment:

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
    Windows 10
  • Browser [e.g. chrome, safari]
    Chrome
  • Version [e.g. 22]
    Version 114.0.5735.199 (Official Build) (64-bit)

Steps to reproduce the problem:
Uploaded multiple files and when one fails, ContentExplorer's upload listener is not called at all.
It should call for files that were successfully uploaded.
Also, when user clicks on Cancel button, it seems the upload listener is not called even though some files were successfully uploaded.

What is the expected behavior? (Screenshots can be helpful here)
ContentExplorer's upload listener should be called for every file successfully uploaded to box

What went wrong? (Screenshots, console logs, or HAR files can be helpful here)
Uploaded multiple files and when one fails, ContentExplorer's upload listener is not called at all.

Link to application or sample code:
contentExplorer.addListener('upload', function (arrFiles) {

            //Post Meta Data
            for (var i in arrFiles) {

                //Post Meta Data to Service
                var metaData = {
                    DocType: getDocType(),
                    FileName: arrFiles[i].name,
                    FileId: arrFiles[i].id,
                    InstitutionNumber: getInstitutionNumber(),
                    FundNumber: getFundNumber(),
                    FundId: getFundId(),
                    AssociatedId: getDocAssociatedData(),
                    FolderId: getFolderId(),
                    DeliverableKey: getDeliverableKey()                           
                };

                addMetaData(metaData);
                //incrementDocumentCount(metaData);
            }

If relevant, link to file (or attach file here)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions